summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-03-22 14:49:13 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-03-22 14:49:13 +0000
commitdb91f8ae913b30b9191ea1cc1531cb1131ff9923 (patch)
treed8dea948aaf9d35c6eacdfe494077dece6315ef1
parent4ab46537834a239e8821609fcf1f1ead3fb078ce (diff)
downloadgdb-db91f8ae913b30b9191ea1cc1531cb1131ff9923.tar.gz
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.
-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 ff69b17e830..046266defbb 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 277395a9b5b..783d9b9ea16 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;
}
}
}