]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorAlan Modra <amodra@gmail.com>
Tue, 22 Mar 2005 14:49:54 +0000 (14:49 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 22 Mar 2005 14:49:54 +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
ld/ChangeLog
ld/emultempl/elf32.em

index c123f10d1bd751dd97822b4b15d7e6afb83662d9..86c9d984960d9f48a475ed9bf1058494fb6013af 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-21  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-ppc.c (is_ppc_elf_target): New function.
index 1721f3f8a3c478a55cf1bf60dd6d5605032ec393..0554a0fdc32b19c8a770bade8fb9d6844830e405 100644 (file)
@@ -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;
                }
            }
        }
index be76c92e4f9e55cf8853fe4acb27de3d4db1b094..fb96a147108af8be84d7f0165ba9fe57dcbb6fd9 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-23  Alan Modra  <amodra@bigpond.net.au>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Set
+       SEC_EXCLUDE on .gnu.warning sections.
+
 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
 
        * scripttempl/elf.sc: When CREATE_SHLIB, put .sdata2 and .sbss2
index 0f9045593803f928e28775249d403ec17a0d3f54..8bdf88d5fcb0eef1d6492307a36fbdc7ff32b8bf 100644 (file)
@@ -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;
       }
   }
 }