[PATCH] D83669: [PowerPC] Support for R_PPC64_REL24_NOTOC calls where the caller has no TOC and the callee is not DSO local

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 04:39:21 PDT 2020


stefanp created this revision.
stefanp added reviewers: nemanjai, sfertile, MaskRay, ruiu, hfinkel, PowerPC.
Herald added subscribers: shchenz, kbarton, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

This patch supports the situation where caller does not have a valid TOC and
calls using the R_PPC64_REL24_NOTOC relocation and the callee is not DSO local.
In this case the call cannot be made directly since the callee may or may not
require a valid TOC pointer. As a result this situation requires an R12 <https://reviews.llvm.org/source/lldb/> setup
plt stub.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83669

Files:
  lld/ELF/Arch/PPC64.cpp
  lld/ELF/Thunks.cpp
  lld/test/ELF/Inputs/ppc64-callee-global.s
  lld/test/ELF/ppc64-pcrel-call-to-extern.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83669.277385.patch
Type: text/x-patch
Size: 5466 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200713/ed27143e/attachment.bin>


More information about the llvm-commits mailing list