OSDN Git Service

bfd/
authorAlan Modra <amodra@bigpond.net.au>
Tue, 22 Mar 2005 14:49:13 +0000 (14:49 +0000)
committerAlan Modra <amodra@bigpond.net.au>
Tue, 22 Mar 2005 14:49:13 +0000 (14:49 +0000)
* 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.

bfd/ChangeLog
bfd/elflink.c

index ff69b17..046266d 100644 (file)
@@ -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
index 277395a..783d9b9 100644 (file)
@@ -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;
                }
            }
        }