[PATCH] D142879: [RISCV] Emit relocation for uleb128

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 02:50:17 PST 2023


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

Support for the uleb128 related relocation[1], ULEB128 format has used
by DWARF and exception handling table, which used ULEB128 to record data
and the distance of two symbols, however the linker relaxation might
change the symbol address, so we need to insert relocations for those
data to make sure they are still correct after linker relaxation.

NOTE: DO NOT merge this until corresponding psABI PR has merged.

[1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/361


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142879

Files:
  llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142879.493259.patch
Type: text/x-patch
Size: 4541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230130/9cf136ef/attachment.bin>


More information about the llvm-commits mailing list