summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-11-27 05:40:13 +0000
committerLang Hames <lhames@gmail.com>2014-11-27 05:40:13 +0000
commita5cd950c731c803e1a65159e53bbdad0ca255bef (patch)
treeae67244863206e30750be99a040efde158aff24b /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
parent9b38ec248a60c9fdfd36e582c44f72b2bcea64c8 (diff)
downloadbcm5719-llvm-a5cd950c731c803e1a65159e53bbdad0ca255bef.tar.gz
bcm5719-llvm-a5cd950c731c803e1a65159e53bbdad0ca255bef.zip
[MCJIT] Remove the local symbol table from RuntimeDlyd - it's not needed.
All symbols have to be stored in the global symbol to enable cross-rtdyld-instance linking, so the local symbol table content is redundant. llvm-svn: 222867
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 81020dc7712..7d4dea630d0 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -52,8 +52,7 @@ int64_t RuntimeDyldMachO::memcpyAddend(const RelocationEntry &RE) const {
RelocationValueRef RuntimeDyldMachO::getRelocationValueRef(
const ObjectFile &BaseTObj, const relocation_iterator &RI,
- const RelocationEntry &RE, ObjSectionToIDMap &ObjSectionToID,
- const SymbolTableMap &Symbols) {
+ const RelocationEntry &RE, ObjSectionToIDMap &ObjSectionToID) {
const MachOObjectFile &Obj =
static_cast<const MachOObjectFile &>(BaseTObj);
@@ -66,19 +65,14 @@ RelocationValueRef RuntimeDyldMachO::getRelocationValueRef(
symbol_iterator Symbol = RI->getSymbol();
StringRef TargetName;
Symbol->getName(TargetName);
- SymbolTableMap::const_iterator SI = Symbols.find(TargetName.data());
- if (SI != Symbols.end()) {
+ SymbolTableMap::const_iterator SI =
+ GlobalSymbolTable.find(TargetName.data());
+ if (SI != GlobalSymbolTable.end()) {
Value.SectionID = SI->second.first;
Value.Offset = SI->second.second + RE.Addend;
} else {
- SI = GlobalSymbolTable.find(TargetName.data());
- if (SI != GlobalSymbolTable.end()) {
- Value.SectionID = SI->second.first;
- Value.Offset = SI->second.second + RE.Addend;
- } else {
- Value.SymbolName = TargetName.data();
- Value.Offset = RE.Addend;
- }
+ Value.SymbolName = TargetName.data();
+ Value.Offset = RE.Addend;
}
} else {
SectionRef Sec = Obj.getRelocationSection(RelInfo);
OpenPOWER on IntegriCloud