aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-03-22 14:49:16 +0000
committerAlan Modra <amodra@gmail.com>2005-03-22 14:49:16 +0000
commit11d2f718eb85e809ae4dbc185083947bdfca4eb0 (patch)
treee9c9ccf77c8aa1615a850f52723a6cdca4c4e508 /bfd
parent52a43e710025c249ec5d6d87ca60a9e7b82209ee (diff)
downloadgdb-11d2f718eb85e809ae4dbc185083947bdfca4eb0.zip
gdb-11d2f718eb85e809ae4dbc185083947bdfca4eb0.tar.gz
gdb-11d2f718eb85e809ae4dbc185083947bdfca4eb0.tar.bz2
bfd/
* elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on .gnu.warning.* sections. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set SEC_EXCLUDE on .gnu.warning sections.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ff69b17..046266d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
+ .gnu.warning.* sections.
+
2005-03-22 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (elf_linker_section_pointers_t): Remove
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 277395a..783d9b9 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3240,6 +3240,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
/* Clobber the section size so that the warning does
not get copied into the output file. */
s->size = 0;
+
+ /* Also set SEC_EXCLUDE, so that symbols defined in
+ the warning section don't get copied to the output. */
+ s->flags |= SEC_EXCLUDE;
}
}
}