diff options
author | Alan Modra <amodra@gmail.com> | 2011-09-29 05:40:21 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-09-29 05:40:21 +0000 |
commit | c227efa6d5818f621e676128da73d9118be07256 (patch) | |
tree | 96a6e607ed780ff24cd237467b707d90ceb4a1dd /bfd/elflink.c | |
parent | 39c1f96aef420f7b82935a370432c054d07b2476 (diff) | |
download | binutils-c227efa6d5818f621e676128da73d9118be07256.zip binutils-c227efa6d5818f621e676128da73d9118be07256.tar.gz binutils-c227efa6d5818f621e676128da73d9118be07256.tar.bz2 |
PR ld/13233
* elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
debug and special section groups.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index a15ad27..5d181f7 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -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; |