diff options
author | 2021-08-07 14:10:38 +0930 | |
---|---|---|
committer | 2021-08-13 23:52:52 +0200 | |
commit | 9d19478d72348d9d419ee3c4589e06012e079115 (patch) | |
tree | 04ef1926d044b5d471653682e6ce637c83f203b6 | |
parent | IBM Z: Add another arch14 instruction (diff) | |
download | binutils-gdb-9d19478d72348d9d419ee3c4589e06012e079115.tar.gz binutils-gdb-9d19478d72348d9d419ee3c4589e06012e079115.tar.bz2 binutils-gdb-9d19478d72348d9d419ee3c4589e06012e079115.zip |
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.
(cherry picked from commit 182ad37589e3931390d0c43f1d52a9a6e0062a61)
(cherry picked from commit d86cf1b0d5ac6c0d900ae2b2a07fce7c4414d0e6)
-rw-r--r-- | bfd/elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c index de5abafabf0..9c3f34c415b 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -7984,7 +7984,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. */ |