DWARFDebugLoclists: Make it possible to read relocated addresses
authorPavel Labath <pavel@labath.sk>
Thu, 31 Oct 2019 13:31:42 +0000 (14:31 +0100)
committerPavel Labath <pavel@labath.sk>
Tue, 5 Nov 2019 09:21:39 +0000 (10:21 +0100)
commitb4c5b8f3f51206bac2282a8b483e76ad59a5aed5
tree2540364a5d24115e172f56757711baa7217621b0
parent0d14656b9d8ca38b8ea321c7047eaeec43c5b2ef
DWARFDebugLoclists: Make it possible to read relocated addresses

Summary:
Handling relocations was not needed when the loclists section was a
DWO-only thing. But since DWARF5, it is possible to use it in regular
objects too, and the standard permits embedding addresses into the
section directly. These addresses need to be relocated in unlinked
files.

Reviewers: JDevlieghere, dblaikie, probinson

Subscribers: aprantl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68271
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug_loclists.s [new file with mode: 0644]