summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
diff options
context:
space:
mode:
authorAmara Emerson <amara.emerson@arm.com>2012-11-16 11:11:59 +0000
committerAmara Emerson <amara.emerson@arm.com>2012-11-16 11:11:59 +0000
commitc958bf30b9922549335d20e4852da4312cbccc29 (patch)
tree920105557f5dd82efa6476331ca6959c7b28507c /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
parent18aa124075859c5b1fd97cf39bd5bef1763acc4b (diff)
downloadbcm5719-llvm-c958bf30b9922549335d20e4852da4312cbccc29.tar.gz
bcm5719-llvm-c958bf30b9922549335d20e4852da4312cbccc29.zip
Add R_ARM_TARGET1 relocation to MCJIT and ensure that the runtime dyld reads
all symbols during object loading, not just global ones. This fixes JIT execution of code using llvm.global_ctors with internal linkage constructors. llvm-svn: 168148
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 4118e8ad509..e6e1bdc8b19 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -125,9 +125,7 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectBuffer *InputBuffer) {
<< " flags: " << flags
<< " SID: " << SectionID
<< " Offset: " << format("%p", SectOffset));
- bool isGlobal = flags & SymbolRef::SF_Global;
- if (isGlobal)
- GlobalSymbolTable[Name] = SymbolLoc(SectionID, SectOffset);
+ GlobalSymbolTable[Name] = SymbolLoc(SectionID, SectOffset);
}
}
DEBUG(dbgs() << "\tType: " << SymType << " Name: " << Name << "\n");
OpenPOWER on IntegriCloud