[PATCH] D127057: [JITLink][ELF/AARCH64] Implement R_AARCH64_ADR_GOT_PAGE and R_AARCH64_LD64_GOT_LO12_NC

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 4 17:23:56 PDT 2022


sunho created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
sunho requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch implements two most commonly used Global Offset Table relocations in ELF/AARCH64: R_AARCH64_ADR_GOT_PAGE and R_AARCH64_LD64_GOT_LO12_NC. It implements the GOT table manager by extending the existing PerGraphGOTAndPLTStubsBuilder. I brought a lot of code from Macho/ARM64 backend's GOT manager and it looks very possible to unify them to generic aarch64 got table manager.

I thought it's better to unify them in the later patch to focus changes on ELF backend, but I can do it in this patch if that's preferred.


https://reviews.llvm.org/D127057

Files:
  llvm/include/llvm/ExecutionEngine/JITLink/ELF_aarch64.h
  llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp
  llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127057.434295.patch
Type: text/x-patch
Size: 6205 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220605/cc0c3d95/attachment.bin>


More information about the llvm-commits mailing list