PR22374, PowerPC unnecessary PLT entries
authorAlan Modra <amodra@gmail.com>
Tue, 31 Oct 2017 11:43:21 +0000 (22:13 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 1 Nov 2017 08:16:34 +0000 (18:46 +1030)
commit3988aed54acce3c682a877b51b0e09cce1079e81
treef06e9392e2810d410cd007b7d8ee52fb75320c99
parente48f0c8f1b9fdb195394dc7afea02ce55e4ba5e4
PR22374, PowerPC unnecessary PLT entries

We don't need a PLT entry when function pointer initialization in a
read/write section is the only reference to a given function symbol.
This patch prevents the unnecessary PLT entry, and ensures no dynamic
relocs are emitted when UNDEFWEAK_NO_DYNAMIC_RELOC says so.

bfd/
PR 22374
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
entry when just a dynamic reloc can serve.  Ensure no dynamic
relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
Expand and move the non_got_ref comment.
* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
ld/
* testsuite/ld-powerpc/ambiguousv2.d: Remove FIXME.
bfd/ChangeLog
bfd/elf32-ppc.c
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/ambiguousv2.d
This page took 0.045148 seconds and 4 git commands to generate.