diff options
author | David Blaikie <dblaikie@gmail.com> | 2016-12-16 16:31:10 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2016-12-16 16:31:10 +0000 |
commit | e9fda9f2013b1356aa48db6897eeaee2c21da603 (patch) | |
tree | 0f62759c21c5b796d4c4b3848d42eba8d9500431 /llvm/lib | |
parent | e0a1bdad3f54859678aa60959ef33be4ef69be50 (diff) | |
download | bcm5719-llvm-e9fda9f2013b1356aa48db6897eeaee2c21da603.tar.gz bcm5719-llvm-e9fda9f2013b1356aa48db6897eeaee2c21da603.zip |
dwarfdump: Support/process relocations on a CU's abbrev_off
Input can be produced by ld -r, for example (a normal LLVM workflow
never hits this - LLVM only ever produces a single abbrev table in an
object (shared by multiple CUs), so the reloc's always 0, and when it's
linked together the relocation's resolved so it doesn't need to be
handled)
llvm-svn: 289954
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp index 2ddbc507ff6..8e5691aebab 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp @@ -87,7 +87,10 @@ bool DWARFUnit::getStringOffsetSectionItem(uint32_t Index, bool DWARFUnit::extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) { Length = debug_info.getU32(offset_ptr); Version = debug_info.getU16(offset_ptr); + auto AI = InfoSection.Relocs.find(*offset_ptr); uint64_t AbbrOffset = debug_info.getU32(offset_ptr); + if (AI != InfoSection.Relocs.end()) + AbbrOffset += AI->second.second; if (IndexEntry) { if (AbbrOffset) return false; |