[PATCH] D80392: [WIP][mips] Use pc-relative relocations in .eh_frame

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 11:21:57 PDT 2020


atanasyan created this revision.
atanasyan added reviewers: sdardis, dsanders, arichardson, MaskRay.
Herald added subscribers: jrtc27, hiraditya, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
atanasyan added a parent revision: D80390: [WIP][mips] Support 64-bit relative relocations.

Use pc-relative relocations in .eh_frame. `R_MIPS_PC32` relocation is generated in 32-bit case. `R_MIPS_PC32 | R_MIPS_64` relocation chain is generated in 64-bit case for all code model.

With this change object files can be linked by LLD without having to pass `-Wl,-z,notext` options.

Now this patch is rather "proof-of-concept". Not a commit ready changes. Any comments are welcome.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80392

Files:
  lld/test/ELF/mips-eh_frame-pic.s
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/MC/MCObjectFileInfo.cpp
  llvm/lib/Object/RelocationResolver.cpp
  llvm/test/CodeGen/Mips/ehframe-indirect.ll
  llvm/test/DebugInfo/Mips/eh_frame.ll
  llvm/test/MC/Mips/eh-frame.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80392.265550.patch
Type: text/x-patch
Size: 10868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200521/b9c25bd2/attachment-0001.bin>


More information about the llvm-commits mailing list