summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
diff options
context:
space:
mode:
authorPreston Gurd <preston.gurd@intel.com>2012-04-12 20:13:57 +0000
committerPreston Gurd <preston.gurd@intel.com>2012-04-12 20:13:57 +0000
commit2138ef6d3d68e0e844f901732749ac57eb3c503f (patch)
tree7d79b1864caaf3a18eb03f723ed6cf06c64fa772 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
parent49a7ef5c2331e77d6a2b9e53b469ab93dd075fff (diff)
downloadbcm5719-llvm-2138ef6d3d68e0e844f901732749ac57eb3c503f.tar.gz
bcm5719-llvm-2138ef6d3d68e0e844f901732749ac57eb3c503f.zip
This patch improves the MCJIT runtime dynamic loader by adding new handling
of zero-initialized sections, virtual sections and common symbols and preventing the loading of sections which are not required for execution such as debug information. Patch by Andy Kaylor! llvm-svn: 154610
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 9d46b21f59d..57fefee5ded 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -71,7 +71,8 @@ void RuntimeDyldELF::resolveX86Relocation(uint8_t *LocalAddress,
switch (Type) {
case ELF::R_386_32: {
uint32_t *Target = (uint32_t*)(LocalAddress);
- *Target = Value + Addend;
+ uint32_t Placeholder = *Target;
+ *Target = Placeholder + Value + Addend;
break;
}
case ELF::R_386_PC32: {
OpenPOWER on IntegriCloud