summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-09-07 04:03:32 +0000
committerLang Hames <lhames@gmail.com>2014-09-07 04:03:32 +0000
commitca279c229ac951227b580026dc4afea29625030a (patch)
tree53bf1c67b5e70eb80de8f3edcd5358bfb567f9c2 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
parent1a6602569cb773c6cacd3e2d446f4ea06a7cd77b (diff)
downloadbcm5719-llvm-ca279c229ac951227b580026dc4afea29625030a.tar.gz
bcm5719-llvm-ca279c229ac951227b580026dc4afea29625030a.zip
[MCJIT] Rewrite RuntimeDyldMachO and its derived classes to use the 'Offset'
field of RelocationValueRef, rather than the 'Addend' field. This is consistent with RuntimeDyldELF's use of RelocationValueRef, and more consistent with the semantics of the data being stored (the offset from the start of a section or symbol). llvm-svn: 217328
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 14bcbeb1ec5..8e78317669a 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -53,15 +53,15 @@ RelocationValueRef RuntimeDyldMachO::getRelocationValueRef(
SymbolTableMap::const_iterator SI = Symbols.find(TargetName.data());
if (SI != Symbols.end()) {
Value.SectionID = SI->second.first;
- Value.Addend = SI->second.second + RE.Addend;
+ Value.Offset = SI->second.second + RE.Addend;
} else {
SI = GlobalSymbolTable.find(TargetName.data());
if (SI != GlobalSymbolTable.end()) {
Value.SectionID = SI->second.first;
- Value.Addend = SI->second.second + RE.Addend;
+ Value.Offset = SI->second.second + RE.Addend;
} else {
Value.SymbolName = TargetName.data();
- Value.Addend = RE.Addend;
+ Value.Offset = RE.Addend;
}
}
} else {
@@ -71,7 +71,7 @@ RelocationValueRef RuntimeDyldMachO::getRelocationValueRef(
Value.SectionID = findOrEmitSection(ObjImg, Sec, IsCode, ObjSectionToID);
uint64_t Addr;
Sec.getAddress(Addr);
- Value.Addend = RE.Addend - Addr;
+ Value.Offset = RE.Addend - Addr;
}
return Value;
@@ -90,7 +90,7 @@ void RuntimeDyldMachO::makeValueAddendPCRel(RelocationValueRef &Value,
if (IsPCRel) {
uint64_t RelocAddr = 0;
RI->getAddress(RelocAddr);
- Value.Addend += RelocAddr + OffsetToNextPC;
+ Value.Offset += RelocAddr + OffsetToNextPC;
}
}
OpenPOWER on IntegriCloud