mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
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.
This commit is contained in:
@ -11682,7 +11682,8 @@ elf_final_link_free (bfd *obfd, struct elf_final_link_info *flinfo)
|
||||
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user