Change plt stubs to have destination in r12.
authorAlan Modra <amodra@gmail.com>
Tue, 29 Oct 2013 02:09:30 +0000 (12:39 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Oct 2013 03:05:47 +0000 (13:35 +1030)
commit71a39c98f8bedad54818c62ab2d567b0e2de546b
treeaa51b26e7261f5b3db779b330d833bcc478169c6
parentf9c6b9078c54ea0f018b673e2ff128e61a0aa666
Change plt stubs to have destination in r12.

This change is to support the new ELFv2 ABI, which uses the value in
r12 on function entry to calculate the got/toc pointer.

bfd/
* elf64-ppc.c (build_plt_stub): Switch stubs to use r11 as base
reg and r12 as destination.
(ppc_build_one_stub): Likewise.
(ppc64_elf_build_stubs): Likewise for glink.
ld/testsuite/
* ld-powerpc/tls.s: Add proper .opd entry for _start.
* ld-powerpc/tlstoc.s: Likewise.
* ld-powerpc/relbrlt.d: Update for changed stubs.
* ld-powerpc/tls.d: Update for changed stubs and _start .opd entry.
* ld-powerpc/tls.g: Likewise.
* ld-powerpc/tlsexe.d: Likewise.
* ld-powerpc/tlsexe.g: Likewise.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsexetoc.d: Likewise.
* ld-powerpc/tlsexetoc.g: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlstoc.d: Likewise.
* ld-powerpc/tlstoc.g: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
22 files changed:
bfd/ChangeLog
bfd/elf64-ppc.c
ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/relbrlt.d
ld/testsuite/ld-powerpc/tls.d
ld/testsuite/ld-powerpc/tls.g
ld/testsuite/ld-powerpc/tls.s
ld/testsuite/ld-powerpc/tlsexe.d
ld/testsuite/ld-powerpc/tlsexe.g
ld/testsuite/ld-powerpc/tlsexe.r
ld/testsuite/ld-powerpc/tlsexetoc.d
ld/testsuite/ld-powerpc/tlsexetoc.g
ld/testsuite/ld-powerpc/tlsexetoc.r
ld/testsuite/ld-powerpc/tlsso.d
ld/testsuite/ld-powerpc/tlsso.g
ld/testsuite/ld-powerpc/tlsso.r
ld/testsuite/ld-powerpc/tlstoc.d
ld/testsuite/ld-powerpc/tlstoc.g
ld/testsuite/ld-powerpc/tlstoc.s
ld/testsuite/ld-powerpc/tlstocso.d
ld/testsuite/ld-powerpc/tlstocso.g
ld/testsuite/ld-powerpc/tlstocso.r