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

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 07:00:12 PDT 2020


sfertile added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:911
+void PPC64PCRelPLTStub::addSymbols(ThunkSection &isec) {
+  addSymbol(saver.save("__plt_pc-rel_" + destination.getName()), STT_FUNC, 0,
+            isec);
----------------
stefanp wrote:
> nit:
> Try to use `__plt_pcrel_` instead of `__plt_pc-rel_`. 
> The `-` is probably fine as part of a function name but since I'm not 100% sure I would not risk it.
+1. Stefan's suggestions in more consistent with the other stub names.


================
Comment at: lld/ELF/Thunks.cpp:1043
+    return (type == R_PPC64_REL24_NOTOC)
+               ? (Thunk *)make<PPC64PCRelPLTStub>(s)
+               : (Thunk *)make<PPC64PltCallStub>(s);
----------------
Are the casts needed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83669/new/

https://reviews.llvm.org/D83669





More information about the llvm-commits mailing list