diff options
author | Alan Modra <amodra@gmail.com> | 2018-04-27 15:46:40 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-04-27 17:12:32 +0930 |
commit | 04383fd15b3b82d824df9c72e3ade88c43bfb5ac (patch) | |
tree | e61f7ca05cb6fb083adf17f802176c5b234ab8c5 /bfd/elf32-ppc.c | |
parent | ced8ce28a4f72cfd8eaee0d17cf090997cc2fab7 (diff) | |
download | gdb-04383fd15b3b82d824df9c72e3ade88c43bfb5ac.zip gdb-04383fd15b3b82d824df9c72e3ade88c43bfb5ac.tar.gz gdb-04383fd15b3b82d824df9c72e3ade88c43bfb5ac.tar.bz2 |
PR23123, PowerPC32 ifunc regression
Two of the gcc ifunc tests fail for ppc32, due to my pr22374 fix being
a little too enthusiastic in trimming PLT entries. ppc64 doesn't have
the same failures because ppc64_elf_check_relocs happens to set
needs_plt for any ifunc reloc.
PR 23123
PR 22374
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
relocs for ifuncs.
* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 0438af4..1200de8 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -5899,9 +5899,9 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, && !readonly_dynrelocs (h)) { h->pointer_equality_needed = 0; - /* If we haven't seen a branch reloc then we don't need - a plt entry. */ - if (!h->needs_plt) + /* If we haven't seen a branch reloc and the symbol + isn't an ifunc then we don't need a plt entry. */ + if (!h->needs_plt && h->type != STT_GNU_IFUNC) h->plt.plist = NULL; } else if (!bfd_link_pic (info)) |