PR ld/13233
authorAlan Modra <amodra@gmail.com>
Thu, 29 Sep 2011 05:40:21 +0000 (05:40 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 29 Sep 2011 05:40:21 +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 d34193192a2f3c1fdf021c78b54c4e0ac855515c..011e33cf5db27370971d9a02010d809ad13a2fe1 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-27  Kai Tietz  <ktietz@redhat.com>
 
        * coffcode.h (sec_to_styp_flags): Handle
index a15ad27bac5964fbd91feddd6e20e3b9ec933b24..5d181f7993c2fe76fdcd03cf19efeac6c2bb8ab5 100644 (file)
@@ -11668,9 +11668,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;
This page took 0.032207 seconds and 4 git commands to generate.