]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR ld/13233
authorAlan Modra <amodra@gmail.com>
Thu, 29 Sep 2011 05:40:44 +0000 (05:40 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 29 Sep 2011 05:40:44 +0000 (05:40 +0000)
* elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
debug and special section groups.

bfd/ChangeLog
bfd/elflink.c

index 02479ec07dbe989e99942631255ffe01e3a646cc..d5af9dbced05ee03feae70861ccb145ee40c9db8 100644 (file)
@@ -1,3 +1,9 @@
+2011-09-29  Alan Modra  <amodra@gmail.com>
+
+       PR ld/13233
+       * elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
+       debug and special section groups.
+
 2011-09-26  Tristan Gingold  <gingold@adacore.com>
 
        * configure.in: Bump version to 2.21.90
index 9ccf37df051d075f24d945f21cf273dada6742bd..9bd2c5c9d42140d506e870be0eece3755324b069 100644 (file)
@@ -11667,9 +11667,10 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info,
        continue;
 
       /* Keep debug and special sections like .comment when they are
-        not part of a group.  */
+        not part of a group, or when we have single-member groups.  */
       for (isec = ibfd->sections; isec != NULL; isec = isec->next)
-       if (elf_next_in_group (isec) == NULL
+       if ((elf_next_in_group (isec) == NULL
+            || elf_next_in_group (isec) == isec)
            && ((isec->flags & SEC_DEBUGGING) != 0
                || (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0))
          isec->gc_mark = 1;