aboutsummaryrefslogtreecommitdiff
path: root/ld/pe-dll.c
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2006-12-18 22:38:53 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2006-12-18 22:38:53 +0000
commitff2bdb9c0d6a2a966336c6b1d5cee3ce5bc109fe (patch)
treea735301729c6c03ac6c10e931bd47a628abafee3 /ld/pe-dll.c
parent69fbadd53d1404744d3e6032c42397c894d66be3 (diff)
downloadgdb-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/pe-dll.c')
-rw-r--r--ld/pe-dll.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 43caa0c..0f0f2e0 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -2830,3 +2830,11 @@ pe_exe_fill_sections (bfd *abfd, struct bfd_link_info *info)
}
reloc_s->contents = reloc_d;
}
+
+bfd_boolean
+pe_bfd_is_dll (bfd *abfd)
+{
+ return (bfd_get_format (abfd) == bfd_object
+ && obj_pe (abfd)
+ && pe_data (abfd)->dll);
+}