From: David Blaikie Date: Fri, 16 Dec 2016 17:10:17 +0000 (+0000) Subject: Revert "dwarfdump: Support/process relocations on a CU's abbrev_off" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d4a5599daa214da4d7f01cf782acda9b6239acf;p=platform%2Fupstream%2Fllvm.git Revert "dwarfdump: Support/process relocations on a CU's abbrev_off" Reverting because this breaks lld's gdb_index support - it's probably double counting the abbrev relocation offset. This reverts commit r289954. llvm-svn: 289961 --- diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp index 8e5691ae..2ddbc50 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp @@ -87,10 +87,7 @@ 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; diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-abbrev-off.elf-x86-64 b/llvm/test/DebugInfo/Inputs/dwarfdump-abbrev-off.elf-x86-64 deleted file mode 100644 index bc196b5..0000000 Binary files a/llvm/test/DebugInfo/Inputs/dwarfdump-abbrev-off.elf-x86-64 and /dev/null differ diff --git a/llvm/test/DebugInfo/dwarfdump-abbrev-off.test b/llvm/test/DebugInfo/dwarfdump-abbrev-off.test deleted file mode 100644 index 2937d8c..0000000 --- a/llvm/test/DebugInfo/dwarfdump-abbrev-off.test +++ /dev/null @@ -1,8 +0,0 @@ -RUN: llvm-dwarfdump -debug-dump=info %p/Inputs/dwarfdump-abbrev-off.elf-x86-64 | FileCheck %s - -Check that we apply relocations to the abbr_offset - while LLVM never produces -an object file like this, a reproduction can be produced by linking two simple -object files together with ld -r. - -CHECK: abbr_offset = 0x0000 -CHECK: abbr_offset = 0x0010