[PATCH] D49795: [PPC64] Position-indepenent long-branch thunks.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 25 06:10:28 PDT 2018


sfertile created this revision.
sfertile added reviewers: syzaara, ruiu, rdhindsa.
Herald added subscribers: kbarton, arichardson, nemanjai, emaste.
Herald added a reviewer: espindola.

Patch implements range-extending thunks for calls that exceed the reach of a bl instruction for position-independent code.

If a callee is the target of a call that needs a range-extension, its allocated a slot in the procedure linkage table after all the entries that are for non-local calls, and a relative dynamic relocation is emitted in the rela.dyn section. The thunk body loads the address of the local-entry from the .plt and indirectly branches to it.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D49795

Files:
  ELF/Arch/PPC64.cpp
  ELF/Symbols.cpp
  ELF/Symbols.h
  ELF/SyntheticSections.cpp
  ELF/SyntheticSections.h
  ELF/Thunks.cpp
  ELF/Writer.cpp
  test/ELF/basic-ppc64.s
  test/ELF/ppc64-rel24-reach.s
  test/ELF/ppc64-shared-long_branch.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49795.157254.patch
Type: text/x-patch
Size: 20881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180725/3375861c/attachment.bin>


More information about the llvm-commits mailing list