aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-04-13 16:44:08 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-04-13 16:44:08 +0000
commite75a280b02f870156957a6fa46cd7888714698ef (patch)
treecfc451d7cd863620820869ca1f5c130fcce8e05e /bfd/elflink.c
parent776dbd277f12a10a7dddd6ffe3c6bc9e66c4cbea (diff)
downloadgdb-e75a280b02f870156957a6fa46cd7888714698ef.zip
gdb-e75a280b02f870156957a6fa46cd7888714698ef.tar.gz
gdb-e75a280b02f870156957a6fa46cd7888714698ef.tar.bz2
bfd/
2005-04-13 Daniel Jacobowitz <dan@codesourcery.com> * elflink.c (elf_link_input_bfd): Update check for removed sections. ld/testsuite/ 2005-04-13 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/empty.d: New file. * ld-elf/empty.s: Likewise.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index d37b19b..09d0616 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -6869,6 +6869,11 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
&& (isec->flags & SEC_EXCLUDE) != 0)))
continue;
+ /* If the section is not in the output BFD's section list, it is not
+ being output. */
+ if (bfd_section_removed_from_list (output_bfd, isec->output_section))
+ continue;
+
/* Get the name of the symbol. */
name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link,
isym->st_name);