PR28186, SEGV elf.c:7991:30 in _bfd_elf_fixup_group_sections

PR 28186
	* elf.c (_bfd_elf_fixup_group_sections): Don't segfault on
	objcopy/strip with NULL output_section.
This commit is contained in:
Alan Modra
2021-08-07 14:10:38 +09:30
parent 983cdaecc1
commit 182ad37589

View File

@ -7985,7 +7985,7 @@ _bfd_elf_fixup_group_sections (bfd *ibfd, asection *discarded)
isec->flags |= SEC_EXCLUDE; isec->flags |= SEC_EXCLUDE;
} }
} }
else else if (isec->output_section != NULL)
{ {
/* Adjust the output section size when called from /* Adjust the output section size when called from
objcopy. */ objcopy. */