From 182ad37589e3931390d0c43f1d52a9a6e0062a61 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 7 Aug 2021 14:10:38 +0930 Subject: [PATCH] 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. --- bfd/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfd/elf.c b/bfd/elf.c index 5941eeb010b..380d64d699d 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -7985,7 +7985,7 @@ _bfd_elf_fixup_group_sections (bfd *ibfd, asection *discarded) isec->flags |= SEC_EXCLUDE; } } - else + else if (isec->output_section != NULL) { /* Adjust the output section size when called from objcopy. */ -- 2.30.2