diff options
author | Nick Clifton <nickc@redhat.com> | 2007-08-06 14:32:08 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-08-06 14:32:08 +0000 |
commit | 880383ca963721a269a8b99f41fa26e711218740 (patch) | |
tree | f209b80709a14b1988ab4df4f4060ef26857454d /ld | |
parent | d0913de2b8aefa914acfd6e0e3a8cbfbd536f721 (diff) | |
download | gdb-880383ca963721a269a8b99f41fa26e711218740.zip gdb-880383ca963721a269a8b99f41fa26e711218740.tar.gz gdb-880383ca963721a269a8b99f41fa26e711218740.tar.bz2 |
* emultempl/pep.em: (pep_enable_stdcall_fixup): Set to value 1.
(gld_xxx_recognized_file): Use pep_bfd_is_dll for detection of shared objects.
* pe-dll.c: (autofilter_symbollist_i386): Define set for amd64 mingw target.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/emultempl/pep.em | 17 | ||||
-rw-r--r-- | ld/pe-dll.c | 9 |
3 files changed, 20 insertions, 14 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 11d618c..69c65d5 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2007-08-06 Kai Tietz <kai.tietz@onevision.com> + + * emultempl/pep.em: (pep_enable_stdcall_fixup): Set to value 1. + (gld_xxx_recognized_file): Use pep_bfd_is_dll for detection of + shared objects. + * pe-dll.c: (autofilter_symbollist_i386): Define set for amd64 + mingw target. + 2007-08-01 Nick Clifton <nickc@redhat.com> * po/ga.po: Updated Irish translation. diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index 6a21bc7..a78435b 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -106,7 +106,7 @@ static int support_old_code = 0; static lang_assignment_statement_type *image_base_statement = 0; #ifdef DLL_SUPPORT -static int pep_enable_stdcall_fixup = -1; /* 0=disable 1=enable. */ +static int pep_enable_stdcall_fixup = 1; /* 0=disable 1=enable (default). */ static char * pep_out_def_filename = NULL; static char * pep_implib_filename = NULL; static int pep_enable_auto_image_base = 0; @@ -1305,19 +1305,8 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT #ifdef TARGET_IS_i386pep pep_dll_id_target ("pei-x86-64"); #endif - if (bfd_get_format (entry->the_bfd) == bfd_object) - { - char fbuf[LD_PATHMAX + 1]; - const char *ext; - - if (REALPATH (entry->filename, fbuf) == NULL) - strncpy (fbuf, entry->filename, sizeof (fbuf)); - - ext = fbuf + strlen (fbuf) - 4; - - if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0) - return pep_implied_import_dll (fbuf); - } + if (pep_bfd_is_dll (entry->the_bfd)) + return pep_implied_import_dll (entry->filename); #endif return FALSE; } diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 16850b6..cdbfa70 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -203,6 +203,14 @@ static const autofilter_entry_type autofilter_symbollist_i386[] = { STRING_COMMA_LEN (".text") }, /* Entry point symbols, and entry hooks. */ { STRING_COMMA_LEN ("cygwin_crt0") }, +#ifdef pe_use_x86_64 + { STRING_COMMA_LEN ("DllMain") }, + { STRING_COMMA_LEN ("DllEntryPoint") }, + { STRING_COMMA_LEN ("DllMainCRTStartup") }, + { STRING_COMMA_LEN ("_cygwin_dll_entry") }, + { STRING_COMMA_LEN ("_cygwin_crt0_common") }, + { STRING_COMMA_LEN ("_cygwin_noncygwin_dll_entry") }, +#else { STRING_COMMA_LEN ("DllMain@12") }, { STRING_COMMA_LEN ("DllEntryPoint@0") }, { STRING_COMMA_LEN ("DllMainCRTStartup@12") }, @@ -210,6 +218,7 @@ static const autofilter_entry_type autofilter_symbollist_i386[] = { STRING_COMMA_LEN ("_cygwin_crt0_common@8") }, { STRING_COMMA_LEN ("_cygwin_noncygwin_dll_entry@12") }, { STRING_COMMA_LEN ("cygwin_attach_dll") }, +#endif { STRING_COMMA_LEN ("cygwin_premain0") }, { STRING_COMMA_LEN ("cygwin_premain1") }, { STRING_COMMA_LEN ("cygwin_premain2") }, |