[llvm] r253432 - Fix LLD testsuite fallout from r253429
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 17 20:35:32 PST 2015
Author: majnemer
Date: Tue Nov 17 22:35:32 2015
New Revision: 253432
URL: http://llvm.org/viewvc/llvm-project?rev=253432&view=rev
Log:
Fix LLD testsuite fallout from r253429
Modified:
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=253432&r1=253431&r2=253432&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Tue Nov 17 22:35:32 2015
@@ -964,9 +964,9 @@ static void DisassembleObject(const Obje
uint64_t Address = Symb.first;
StringRef Name = Symb.second;
if (Name.startswith("$d"))
- DataMappingSymsAddr.push_back(Address);
+ DataMappingSymsAddr.push_back(Address - SectionAddr);
if (Name.startswith("$x"))
- TextMappingSymsAddr.push_back(Address);
+ TextMappingSymsAddr.push_back(Address - SectionAddr);
}
}
@@ -1000,7 +1000,7 @@ static void DisassembleObject(const Obje
// If the section has no symbol at the start, just insert a dummy one.
if (Symbols.empty() || Symbols[0].first != 0)
- Symbols.insert(Symbols.begin(), std::make_pair(0, name));
+ Symbols.insert(Symbols.begin(), std::make_pair(SectionAddr, name));
SmallString<40> Comments;
raw_svector_ostream CommentStream(Comments);
@@ -1127,7 +1127,7 @@ static void DisassembleObject(const Obje
const std::pair<uint64_t, StringRef> &RHS) {
return LHS < RHS.first;
});
- if (TargetSym != Symbols.begin()) {
+ if (TargetSym != TargetSectionSymbols->begin()) {
--TargetSym;
uint64_t TargetAddress = std::get<0>(*TargetSym);
StringRef TargetName = std::get<1>(*TargetSym);
More information about the llvm-commits
mailing list