[llvm-commits] [llvm] r168148 - in /llvm/trunk/lib/ExecutionEngine/RuntimeDyld: RuntimeDyld.cpp RuntimeDyldELF.cpp
Amara Emerson
amara.emerson at arm.com
Fri Nov 16 03:11:59 PST 2012
Author: aemerson
Date: Fri Nov 16 05:11:59 2012
New Revision: 168148
URL: http://llvm.org/viewvc/llvm-project?rev=168148&view=rev
Log:
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.
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=168148&r1=168147&r2=168148&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Fri Nov 16 05:11:59 2012
@@ -125,9 +125,7 @@
<< " 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");
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp?rev=168148&r1=168147&r2=168148&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Fri Nov 16 05:11:59 2012
@@ -290,6 +290,7 @@
// Write a 32bit value to relocation address, taking into account the
// implicit addend encoded in the target.
+ case ELF::R_ARM_TARGET1 :
case ELF::R_ARM_ABS32 :
*TargetPtr += Value;
break;
More information about the llvm-commits
mailing list