From bf8b36a0628c36b1f27b77d2c56aac606041bf85 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 13 Apr 2005 16:44:08 +0000 Subject: [PATCH] bfd/ 2005-04-13 Daniel Jacobowitz * elflink.c (elf_link_input_bfd): Update check for removed sections. ld/testsuite/ 2005-04-13 H.J. Lu * ld-elf/empty.d: New file. * ld-elf/empty.s: Likewise. --- bfd/ChangeLog | 5 +++++ bfd/elflink.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 75ff150cbd..1167827e51 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-04-13 Daniel Jacobowitz + + * elflink.c (elf_link_input_bfd): Update check for removed + sections. + 2005-04-12 Alan Modra * Makefile.am: Run "make dep-am". diff --git a/bfd/elflink.c b/bfd/elflink.c index d37b19ba92..09d06167fa 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); -- 2.11.0