Don't touch r11 in __tls_get_addr stub
authorAlan Modra <amodra@gmail.com>
Mon, 20 Jan 2020 02:03:29 +0000 (12:33 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 20 Jan 2020 08:28:05 +0000 (18:58 +1030)
commitb9ca1af69e097b8dc15b23a4e12194f9567c4ad7
treefd79a39913d96fc6411b90855e94fb103d1604af
parented7007c18a83d0d654c366d507fcf053985c698b
Don't touch r11 in __tls_get_addr stub

This modifies the special __tls_get_addr stub that checks for a
tlsdesc style __tls_index entry and returns early.  Not using r11
isn't much benefit at the moment but a followup patch will preserve
regs around the first call to __tls_get_addr when the __tls_index
entry isn't yet set up for an early return.

bfd/
* elf64-ppc.c (LD_R11_0R3, CMPDI_R11_0, STD_R11_0R1, LD_R11_0R1),
(MTLR_R11): Don't define.
(LD_R0_0R3, CMPDI_R0_0): Define.
(build_tls_get_addr_stub): Don't use r11 in stub.
ld/
* testsuite/ld-powerpc/tlsexe.d: Match new __tls_get_addr stub.
* testsuite/ld-powerpc/tlsexeno.d: Likewise.
* testsuite/ld-powerpc/tlsexetoc.d: Likewise.
* testsuite/ld-powerpc/tlsexetocno.d: Likewise.
* testsuite/ld-powerpc/tlsopt5.d: Likewise.
bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/tlsexe.d
ld/testsuite/ld-powerpc/tlsexeno.d
ld/testsuite/ld-powerpc/tlsexetoc.d
ld/testsuite/ld-powerpc/tlsexetocno.d
ld/testsuite/ld-powerpc/tlsopt5.d