[PATCH] D140478: [RISCV] For Dwarf v5, emit indices into .debug_addr for range list entries

Venkata Ramanaiah Nalamothu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 06:52:06 PST 2022


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

Currently the dwarf emission generates offset pair DW_{R,L}LE_offset_pair
relative to the base address for range list entries and these offsets are
resolved during assembing. But this leads to overlapping addresses in the
range lists when the code size changes due to relaxations during linking.

Hence, for dwarf v5, generate indices DW_{R,L}LE_startx_endx into the
.debug_addr for the range list entries which would need relocations and
we would end up with the correct address range when the relocations are
resolved during linking.

For non dwarf v5, we already generate symbol references, which would need
relocations, for range list entries.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140478

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/RISCV/dwarf-riscv-range-list-relocs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140478.484568.patch
Type: text/x-patch
Size: 13209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221221/5fb92b2a/attachment.bin>


More information about the llvm-commits mailing list