From: Alan Modra Date: Tue, 22 Mar 2005 14:49:54 +0000 (+0000) Subject: bfd/ X-Git-Tag: binutils-csl-arm-2005q1-branchpoint~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fbbf7e25ea7878676beebf2b72bbb7b2eb473ef;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c123f10d1bd..86c9d984960 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-03-23 Alan Modra + + * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on + .gnu.warning.* sections. + 2005-03-21 Alan Modra * elf32-ppc.c (is_ppc_elf_target): New function. diff --git a/bfd/elflink.c b/bfd/elflink.c index 1721f3f8a3c..0554a0fdc32 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3237,6 +3237,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; } } } diff --git a/ld/ChangeLog b/ld/ChangeLog index be76c92e4f9..fb96a147108 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2005-03-23 Alan Modra + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set + SEC_EXCLUDE on .gnu.warning sections. + 2005-03-18 Alan Modra * scripttempl/elf.sc: When CREATE_SHLIB, put .sdata2 and .sbss2 diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 0f904559380..8bdf88d5fcb 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1105,6 +1105,10 @@ ${ELF_INTERPRETER_SET_DEFAULT} /* Clobber the section size, so that we don't waste copying the warning 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; } } }