From ff2bdb9c0d6a2a966336c6b1d5cee3ce5bc109fe Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 18 Dec 2006 22:38:53 +0000 Subject: * 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. --- ld/pe-dll.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ld/pe-dll.c') 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); +} -- cgit v1.1