diff options
author | Alan Modra <amodra@gmail.com> | 2019-05-28 14:34:37 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-05-28 14:38:31 +0930 |
commit | a0f6fd217fa53ab80a335fb69f12f1f28ac3335a (patch) | |
tree | e89d3909aa1250a3cc529fac625813483c67f428 /bfd/elf32-lm32.c | |
parent | c83004d526c9f5e203926a979d405f7b720b9ede (diff) | |
download | gdb-a0f6fd217fa53ab80a335fb69f12f1f28ac3335a.zip gdb-a0f6fd217fa53ab80a335fb69f12f1f28ac3335a.tar.gz gdb-a0f6fd217fa53ab80a335fb69f12f1f28ac3335a.tar.bz2 |
LM32 linker segmentation faults
PR 24596
* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
on NULL output_section.
* elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
Diffstat (limited to 'bfd/elf32-lm32.c')
-rw-r--r-- | bfd/elf32-lm32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c index 3a72eaa..2428764 100644 --- a/bfd/elf32-lm32.c +++ b/bfd/elf32-lm32.c @@ -1444,7 +1444,8 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd, FALSE, FALSE, TRUE); if (hend && (hend->type == bfd_link_hash_defined - || hend->type == bfd_link_hash_defweak)) + || hend->type == bfd_link_hash_defweak) + && hend->u.def.section->output_section != NULL) { bfd_vma value = lm32fdpic_fixup32_section (info)->output_section->vma |