diff options
author | Alan Modra <amodra@gmail.com> | 2019-03-18 21:38:36 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-03-18 22:53:07 +1030 |
commit | dba17838ab20a814e6c8ba51afe6962d1c400227 (patch) | |
tree | 23634311f2966e9586a99dfe3727529b45e8ee00 /compile | |
parent | 88739f776b733b0b84600b283417f862a010bb5d (diff) | |
download | fsf-binutils-gdb-dba17838ab20a814e6c8ba51afe6962d1c400227.zip fsf-binutils-gdb-dba17838ab20a814e6c8ba51afe6962d1c400227.tar.gz fsf-binutils-gdb-dba17838ab20a814e6c8ba51afe6962d1c400227.tar.bz2 |
PR24355, segmentation fault in function called from ppc_finish_symbols
This one looks to be a bug going back to 2009, git commit e054468f6c
"STT_GNU_IFUNC support for PowerPC". That bug was carried over with
git commit 49c09209d0 "Rearrange PLT reloc output on powerpc".
If the refcount for an ifunc local sym plt entry was zero,
ppc_elf_size_dynamic_sections would correctly set plt.offset to -1 but
leave glink_offset uninitialized. That leads to occasional segfaults
(which can be made solid with MALLOC_PERTURB_=1 when using glibc).
So, guard the write_glink_stub call with plt.offset != -1. Also,
remove the totally ineffective attempt at writing multiple-use glink
stubs only once.
PR 24355
* elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
for local iplt syms with ent->plt.offset == -1. Remove ineffective
attempt at writing glink stubs only once.
(cherry picked from commit 8cd1fe1bf525b59f4d07e5790d11d49eee7e8494)
Diffstat (limited to 'compile')
0 files changed, 0 insertions, 0 deletions