[PATCH] D145680: [DWARFLinker][DWARFv5] Support debug_loclists.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 03:23:41 PST 2023


avl created this revision.
avl added reviewers: aprantl, JDevlieghere, clayborg, dblaikie.
Herald added subscribers: hiraditya, emaste.
Herald added a project: All.
avl requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

This patch adds support of DWARFv5 .debug_loclists table.
As DWARFLinker resolves relocations, it is able to always
use DW_FORM_addr instead of DW_FORM_addrx. DW_FORM_addrx
helps to minimize number of relocations, it is also used for
split DWARF. Both of these cases are not relevant for the
DWARFLinker. Thus, this patch converts all DW_FORM_addrx
forms into the DW_FORM_addr. And, as the result, it converts
location lists of DW_FORM_loclistx form into the DW_FORM_sec_offset.
For the --update case all DW_FORM_addrx, DW_FORM_loclistx
are preserved as is.

Depends On D145499 <https://reviews.llvm.org/D145499>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145680

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinker.h
  llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
  llvm/include/llvm/DWARFLinker/DWARFStreamer.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/lib/DWARFLinker/DWARFStreamer.cpp
  llvm/test/tools/dsymutil/Inputs/dwarf5-loclists.o
  llvm/test/tools/dsymutil/X86/debug-loc-base-addr.test
  llvm/test/tools/dsymutil/X86/dwarf5-loclists.test
  llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-loclists.test
  llvm/test/tools/llvm-dwarfutil/ELF/X86/warning-skipped-loclists.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145680.503719.patch
Type: text/x-patch
Size: 42128 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230309/c638ea20/attachment-0001.bin>


More information about the llvm-commits mailing list