[PATCH] D83748: Adding support for PCRel32GOTLoad in ELF x86 for the jitlinker

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 09:58:14 PDT 2020


lhames added inline comments.


================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp:35
+  bool isGOTEdge(Edge &E) const {
+    return E.getKind() == PCRel32GOT || E.getKind() == PCRel32GOTLoad;
+  }
----------------
jaredwy wrote:
> MaskRay wrote:
> > PCRel32GOT & PCRel32GOTLoad seem to match the names of Mach-O X86_64_RELOC_GOT & X86_64_RELOC_GOT_LOAD. The ELF relocation types are named R_X86_64_GOTPCREL & R_X86_64_GOTPCRELX
> This was done on purpose, this code is lifted verbatim from the Mach-O side. By normalising the edges of the graph it allows us to write more generic code.
> 
> The next commit after this, will merge all this to a base class that both Mach-O and elf can use.
> 
Yep. The long term plan for JITLink is to make the graph edge kinds per-architecture rather than per-(format,architecture), so I think these names are fine for now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83748





More information about the llvm-commits mailing list