[PATCH] D143269: [DWARFLinker] Refactor cloneAddressAttribute().

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 07:13:12 PST 2023


avl created this revision.
avl added reviewers: aprantl, JDevlieghere, friss.
Herald added a subscriber: hiraditya.
Herald added a project: All.
avl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As a preparation for implementing DWARFv5 address ranges generation,
this patch refactors cloneAddressAttribute() method. It has special
handling for addresses which can be relocated in some unrelated value,
for applying relocations twice, for indexed addresses. Instead of
all these special handlings this patch uses general handling:

Read attribute value from InputDIE and apply PCOffset.

Another thing is that current handling of DW_FORM_addrx misses the
fact that relocations might be applied twice in some cases. This
patch fixes this problem also.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143269

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinker.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/test/tools/dsymutil/Inputs/call-dwarf5.o
  llvm/test/tools/dsymutil/X86/dwarf5-call-site-entry-reloc.test
  llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
  llvm/tools/dsymutil/DwarfLinkerForBinary.h
  llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143269.494626.patch
Type: text/x-patch
Size: 14604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230203/0606c182/attachment.bin>


More information about the llvm-commits mailing list