Backported patch originally targeted against 2.45. --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -14356,5 +14356,6 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info) if (o->flags & SEC_GROUP) { asection *first = elf_next_in_group (o); - o->gc_mark = first->gc_mark; + if (first != NULL) + o->gc_mark = first->gc_mark; } if (o->gc_mark)