PowerPC notoc linkage stubs
authorAlan Modra <amodra@gmail.com>
Thu, 9 Aug 2018 13:23:00 +0000 (22:53 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 24 May 2019 00:58:07 +0000 (10:28 +0930)
commit04bdff6a76b863e61ee46375dd7cdc9adfb75540
tree2eca194aaa66a6a9b01295e073bfbb0b4a55a9e7
parent4a421c53cf609d68fe956c2e7270d34c0ab8500f
PowerPC notoc linkage stubs

Use pcrel addressing instructions in linkage stubs.

bfd/
* elf64-ppc.c: Comment on powerxx _notoc stub variants.
(LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
(PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
(struct ppc_link_hash_table): Add powerxx_stubs.
(ppc64_elf_check_relocs): Set powerxx_stubs.
(build_powerxx_offset, size_powerxx_offset),
(num_relocs_for_powerxx_offset),
(emit_relocs_for_powerxx_offset): New functions.
(plt_stub_size): Size powerxx stubs.
(ppc_build_one_stub): Emit powerxx stubs.
(ppc_size_one_stub): Size powerxx stubs.  Omit .eh_frame for
powerxx stubs.
ld/
* testsuite/ld-powerpc/notoc2.d,
* testsuite/ld-powerpc/notoc2.s: New test.
* testsuite/ld-powerpc/powerpc.exp: Run it.
bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/notoc2.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/notoc2.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/powerpc.exp