PR23937, powerpc64le local ifunc IRELATIVE relocs are wrong
authorAlan Modra <amodra@gmail.com>
Fri, 30 Nov 2018 05:04:11 +0000 (15:34 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 30 Nov 2018 05:48:58 +0000 (16:18 +1030)
commitba85c15dabe144e4bcee5a1b388b32bee10729e1
treeddf634de67d2a3d2c662c569788b3607b9995048
parentf746c08f26dd71fdd809bad8cb92a6cbb8336ec4
PR23937, powerpc64le local ifunc IRELATIVE relocs are wrong

IFUNC resolvers must always be called via their global entry point.
They will be called from ld.so rather than from the local executable.

PR 23937
bfd/
* elf64-ppc.c (write_plt_relocs_for_local_syms): Don't add local
entry offset for ifuncs.
ld/
* testsuite/ld-powerpc/pr23937.d,
* testsuite/ld-powerpc/pr23937.s: New test.
* testsuite/ld-powerpc/powerpc.exp: Run it.
bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/powerpc.exp
ld/testsuite/ld-powerpc/pr23937.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/pr23937.s [new file with mode: 0644]