[PATCH] D81184: [lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 19:55:44 PDT 2020


leonardchan updated this revision to Diff 269403.
leonardchan retitled this revision from "[WIP][ELF][AArch64] Implement the logic for handling R_AARCH64_PLT32" to "[lld][ELF][AArch64] Handle R_AARCH64_PLT32 relocation".
leonardchan edited the summary of this revision.
leonardchan added a comment.

- Removed the llvm changes to be moved to a separate patch.
- Added a test for checking the relocation used with an undefined weak symbol. IIRC, the behavior of this is unspecified anyway.
- Added test for checking overflow.

I also removed the changes relating to thunk emission since I'm not confident in how they should be used here. For example, if I have `.word func at plt - .` and the plt entry for this is more than 2^31 B away, should we have a thunk in the first place? If so, would this word be replaced with the offset to the thunk instead of the PLT, and then have the thunk return the actual offset?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81184

Files:
  lld/ELF/Arch/AArch64.cpp
  lld/ELF/InputSection.cpp
  lld/test/ELF/aarch64-plt32.test
  lld/test/ELF/aarch64-undefined-weak-plt32.test
  lld/test/ELF/relocation-plt32-aarch64.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81184.269403.patch
Type: text/x-patch
Size: 6575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200609/3fe15b8c/attachment.bin>


More information about the llvm-commits mailing list