[llvm-dwarfutil][DWARFv5] fix reading of DW_FORM_addrx attribute.
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Mon, 5 Sep 2022 14:33:22 +0000 (17:33 +0300)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Fri, 23 Sep 2022 06:35:54 +0000 (09:35 +0300)
commitc965ffa1ed9346f058280f8444b1d2792491bd30
treebab2f88e6d143232061c7ae2fd1c8719aea36b09
parentc0185c8d296d6bc8cdcf211fdc19a89afa8e3222
[llvm-dwarfutil][DWARFv5] fix reading of DW_FORM_addrx attribute.

llvm::dwarfutil::ObjFileAddressMap::relocateIndexedAddr() does not
read address value. The relocateIndexedAddr() should not relocate
the address as the linked binary has already resolved relocations.
But it should read the value. This patch adds the reading value
of the address.

Differential Revision: https://reviews.llvm.org/D133324
llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-addrx.test [new file with mode: 0644]
llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp