diff options
author | Christopher Faylor <me+cygwin@cgf.cx> | 2006-12-18 22:38:53 +0000 |
---|---|---|
committer | Christopher Faylor <me+cygwin@cgf.cx> | 2006-12-18 22:38:53 +0000 |
commit | ff2bdb9c0d6a2a966336c6b1d5cee3ce5bc109fe (patch) | |
tree | a735301729c6c03ac6c10e931bd47a628abafee3 /ld/emultempl/pe.em | |
parent | 69fbadd53d1404744d3e6032c42397c894d66be3 (diff) | |
download | gdb-ff2bdb9c0d6a2a966336c6b1d5cee3ce5bc109fe.zip gdb-ff2bdb9c0d6a2a966336c6b1d5cee3ce5bc109fe.tar.gz gdb-ff2bdb9c0d6a2a966336c6b1d5cee3ce5bc109fe.tar.bz2 |
* pe-dll.c (pe_bfd_is_dll): New function.
* pe-dll.h (pe_bfd_is_dll): Declare.
* emultempl/pe.em (gld_${EMULATION_NAME}_recognized_file): Recognize dlls using
pe_bfd_is_dll instead of using the filename extension.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r-- | ld/emultempl/pe.em | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 5416fac..1396e98 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1415,19 +1415,8 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT #ifdef TARGET_IS_arm_wince_pe pe_dll_id_target ("pei-arm-wince-little"); #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 pe_implied_import_dll (fbuf); - } + if (pe_bfd_is_dll (entry->the_bfd)) + return pe_implied_import_dll (entry->filename); #endif return FALSE; } |