[PATCH] D107688: [JITLink][RISCV] Support GOT/PLT relocations

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 6 22:54:59 PDT 2021


StephenFan created this revision.
StephenFan added reviewers: lhames, jrtc27, luismarques.
Herald added subscribers: vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
StephenFan requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

This patch add the R_RISCV_GOT_HI20 and R_RISCV_CALL_PLT relocation support. And the basic got/plt was implemented. Because of riscv32 and riscv64 has different pointer size, the got entry size and instructions of plt entry is different. This patch is the basic support, the optimization pass at preFixup stage has not been implemented.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107688

Files:
  llvm/include/llvm/ExecutionEngine/JITLink/riscv.h
  llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
  llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv32_got_plt_reloc.s
  llvm/test/ExecutionEngine/JITLink/RISCV/ELF_riscv64_got_plt_reloc.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107688.364931.patch
Type: text/x-patch
Size: 10743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210807/493d88f6/attachment.bin>


More information about the llvm-commits mailing list