aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-08-07 14:10:38 +0930
committerAlan Modra <amodra@gmail.com>2021-08-07 14:56:53 +0930
commit182ad37589e3931390d0c43f1d52a9a6e0062a61 (patch)
tree80f32418a5b9b472fe026b4ea3a62e2bdf0bd43b /bfd/elf.c
parent983cdaecc134a5f9adefd052a97bc72321bf0ca3 (diff)
downloadgdb-182ad37589e3931390d0c43f1d52a9a6e0062a61.zip
gdb-182ad37589e3931390d0c43f1d52a9a6e0062a61.tar.gz
gdb-182ad37589e3931390d0c43f1d52a9a6e0062a61.tar.bz2
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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 5941eeb..380d64d 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. */