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.
+2019-05-28 Alan Modra <amodra@gmail.com>
+
+ 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.
+
2019-05-28 Alan Modra <amodra@gmail.com>
PR 24596
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
free (flinfo->indices);
if (flinfo->sections != NULL)
free (flinfo->sections);
- if (flinfo->symshndxbuf != NULL)
+ if (flinfo->symshndxbuf != NULL
+ && flinfo->symshndxbuf != (Elf_External_Sym_Shndx *) -1)
free (flinfo->symshndxbuf);
for (o = obfd->sections; o != NULL; o = o->next)
{