mn10300: Don't free cached internal symbol table
Since ELF linker may cache internal symbol table in init_reloc_cookie, we should check if it is cached, before free it. * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached isymbuf.
This commit is contained in:
parent
9d45a7de8b
commit
478c006f9b
@ -1,3 +1,8 @@
|
||||
2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
|
||||
isymbuf.
|
||||
|
||||
2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
|
||||
|
@ -1377,7 +1377,7 @@ mn10300_elf_check_relocs (bfd *abfd,
|
||||
|
||||
result = TRUE;
|
||||
fail:
|
||||
if (isymbuf != NULL)
|
||||
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
|
||||
free (isymbuf);
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user