aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-11 17:46:10 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-11 17:46:10 +0000
commit59a8b5a8f09ae4c4f3b0e3d8025c6b4cf3ca1f1a (patch)
treeca0f4e97518092abe898964097539a8ccc364b06 /tools
parent6b281800d2bd2419d3f1c4e282c7c07dd54058f5 (diff)
Revert my last two commits while I debug what is wrong in a big endian host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179303 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-readobj/MachODumper.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp
index b027d40bea..2073ddf463 100644
--- a/tools/llvm-readobj/MachODumper.cpp
+++ b/tools/llvm-readobj/MachODumper.cpp
@@ -330,28 +330,20 @@ void MachODumper::printRelocation(section_iterator SecI,
relocation_iterator RelI) {
uint64_t Offset;
SmallString<32> RelocName;
+ int64_t Info;
StringRef SymbolName;
SymbolRef Symbol;
if (error(RelI->getOffset(Offset))) return;
if (error(RelI->getTypeName(RelocName))) return;
+ if (error(RelI->getAdditionalInfo(Info))) return;
if (error(RelI->getSymbol(Symbol))) return;
if (error(Symbol.getName(SymbolName))) return;
- DataRefImpl DR = RelI->getRawDataRefImpl();
- const MachOObjectFileBase::RelocationEntry *RE = Obj->getRelocation(DR);
- bool IsScattered = Obj->isScattered(RE);
-
raw_ostream& OS = W.startLine();
OS << W.hex(Offset)
- << " " << Obj->isPCRel(RE)
- << " " << Obj->getLength(RE);
- if (IsScattered)
- OS << " n/a";
- else
- OS << " " << RE->External;
- OS << " " << RelocName
- << " " << IsScattered
+ << " " << RelocName
<< " " << (SymbolName.size() > 0 ? SymbolName : "-")
+ << " " << W.hex(Info)
<< "\n";
}