diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-04-11 22:21:23 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-04-11 22:21:23 +0000 |
commit | ab82c5b97fcf97e081a3ea5e2291882963fecdae (patch) | |
tree | 2e817f3b505af152d6d397d303f61ee9e673a927 /bfd/linker.c | |
parent | bd695bcc90bf296d67a85cd49c6fe1879715e04e (diff) | |
download | gdb-ab82c5b97fcf97e081a3ea5e2291882963fecdae.zip gdb-ab82c5b97fcf97e081a3ea5e2291882963fecdae.tar.gz gdb-ab82c5b97fcf97e081a3ea5e2291882963fecdae.tar.bz2 |
2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
* linker.c (_bfd_generic_link_output_symbols): Also check if
the output section of an input section has been removed from
the output file.
* section.c (bfd_section_list_remove): Clear the next field
of the removed section.
(bfd_section_removed_from_list): New.
* bfd-in2.h: Regenerated.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index f940d32..89630c0 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -2363,12 +2363,14 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, abort (); /* If this symbol is in a section which is not being included - in the output file, then we don't want to output the symbol. - - Gross. .bss and similar sections won't have the linker_mark - field set. */ - if ((sym->section->flags & SEC_HAS_CONTENTS) != 0 - && ! sym->section->linker_mark) + in the output file, then we don't want to output the + symbol. .bss and similar sections won't have the linker_mark + field set. We also check if its output section has been + removed from the output file. */ + if (((sym->section->flags & SEC_HAS_CONTENTS) != 0 + && ! sym->section->linker_mark) + || bfd_section_removed_from_list (output_bfd, + sym->section->output_section)) output = FALSE; if (output) |