PowerPC64 __tls_get_addr sequence optimization
authorAlan Modra <amodra@gmail.com>
Wed, 30 Aug 2017 11:05:09 +0000 (20:35 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Aug 2017 11:05:09 +0000 (20:35 +0930)
commitb9f04fe0dfe64bc6224e7bb96378607f17da7446
treec97562790bfe1c4b7e81aab4a9368666ef177a6b
parentc7dffc390cf861b313001fd08049a5fd8d758d0d
PowerPC64 __tls_get_addr sequence optimization

There isn't a good reason for ld.bfd to behave differently from gold
in the code generated by TLS GD/LD to LE optimization.

bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
__tls_get_addr call sequences to LE, don't move the addi down
to the nop.  Replace the bl with addi and leave the nop alone.
ld/
* testsuite/ld-powerpc/tls.d: Update.
* testsuite/ld-powerpc/tlsexe.d: Update.
* testsuite/ld-powerpc/tlsexetoc.d: Update.
* testsuite/ld-powerpc/tlsld.d: Update.
* testsuite/ld-powerpc/tlsmark.d: Update.
* testsuite/ld-powerpc/tlsopt4.d: Update.
* testsuite/ld-powerpc/tlstoc.d: Update.
bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/tls.d
ld/testsuite/ld-powerpc/tlsexe.d
ld/testsuite/ld-powerpc/tlsexetoc.d
ld/testsuite/ld-powerpc/tlsld.d
ld/testsuite/ld-powerpc/tlsmark.d
ld/testsuite/ld-powerpc/tlsopt4.d
ld/testsuite/ld-powerpc/tlstoc.d