diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-09 15:05:03 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-09 15:05:03 -0700 |
commit | 478c006f9b4a64d59c31aed081c14c1d7dd4ba68 (patch) | |
tree | 096d9d422e7a2d3bad3a3db4e14fcaea790d72d0 /bfd/elf-m10300.c | |
parent | 9d45a7de8b80336b9965ee99353c34be85b1b98f (diff) | |
download | gdb-478c006f9b4a64d59c31aed081c14c1d7dd4ba68.zip gdb-478c006f9b4a64d59c31aed081c14c1d7dd4ba68.tar.gz gdb-478c006f9b4a64d59c31aed081c14c1d7dd4ba68.tar.bz2 |
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.
Diffstat (limited to 'bfd/elf-m10300.c')
-rw-r--r-- | bfd/elf-m10300.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index 9214a57..b5951c6 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -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; |