aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-readobj
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-09 03:39:05 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-09 03:39:05 +0000
commit167957fa095bc7200b908e6e142be3e604bcfeea (patch)
treee1b413b5c21bfae3e1ddaeff81e9ff75b26b2e28 /tools/llvm-readobj
parentc496875f0c205ffadcec8060e1170e1c58e4eb55 (diff)
Change getRelocationAdditionalInfo to be ELF only.
It was only implemented for ELF where it collected the Addend, so this patch also renames it to getRelocationAddend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r--tools/llvm-readobj/ELFDumper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp
index ea1b83f32f..66cec615ad 100644
--- a/tools/llvm-readobj/ELFDumper.cpp
+++ b/tools/llvm-readobj/ELFDumper.cpp
@@ -579,7 +579,7 @@ void ELFDumper<ELFT>::printRelocation(section_iterator Sec,
uint64_t Offset;
uint64_t RelocType;
SmallString<32> RelocName;
- int64_t Info;
+ int64_t Addend;
StringRef SymbolName;
SymbolRef Symbol;
if (Obj->getElfHeader()->e_type == ELF::ET_REL){
@@ -589,7 +589,7 @@ void ELFDumper<ELFT>::printRelocation(section_iterator Sec,
}
if (error(RelI->getType(RelocType))) return;
if (error(RelI->getTypeName(RelocName))) return;
- if (error(RelI->getAdditionalInfo(Info))) return;
+ if (error(getELFRelocationAddend(*RelI, Addend))) return;
if (error(RelI->getSymbol(Symbol))) return;
if (error(Symbol.getName(SymbolName))) return;
@@ -598,13 +598,13 @@ void ELFDumper<ELFT>::printRelocation(section_iterator Sec,
W.printHex("Offset", Offset);
W.printNumber("Type", RelocName, RelocType);
W.printString("Symbol", SymbolName.size() > 0 ? SymbolName : "-");
- W.printHex("Info", Info);
+ W.printHex("Addend", Addend);
} else {
raw_ostream& OS = W.startLine();
OS << W.hex(Offset)
<< " " << RelocName
<< " " << (SymbolName.size() > 0 ? SymbolName : "-")
- << " " << W.hex(Info)
+ << " " << W.hex(Addend)
<< "\n";
}
}