mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
PowerPC64 segfault in ppc64_elf_edit_toc
Found on a GOT reference to __ehdr_start, which is tweaked to be undefined weak at some stages of linking. SYMBOL_REFERENCES_LOCAL isn't a sufficient test. * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak symbols from GOT optimisation.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2019-08-24 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
|
||||||
|
symbols from GOT optimisation.
|
||||||
|
|
||||||
2019-08-23 Stafford Horne <shorne@gmail.com>
|
2019-08-23 Stafford Horne <shorne@gmail.com>
|
||||||
|
|
||||||
* elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
|
* elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
|
||||||
|
@ -9112,6 +9112,11 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
|
|||||||
r_symndx, ibfd))
|
r_symndx, ibfd))
|
||||||
goto got_error_ret;
|
goto got_error_ret;
|
||||||
|
|
||||||
|
if (sym_sec == NULL
|
||||||
|
|| sym_sec->output_section == NULL
|
||||||
|
|| discarded_section (sym_sec))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!SYMBOL_REFERENCES_LOCAL (info, h))
|
if (!SYMBOL_REFERENCES_LOCAL (info, h))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user