]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
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:50:44 +0000 (16:20 +1030)
commit0f494b01431de53959dd72ccfed06a01d5172e3f
tree44fc53cbdeee7d7e1ab54a2566ec984e180f1cc3
parent081de957bc9c24c706b06b94ffd65f9b4544e62f
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.

(cherry picked from commit ba85c15dabe144e4bcee5a1b388b32bee10729e1)
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]