summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/MCJIT
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
commitc68dda815e64fb2fb463318d1eaa304e22199d50 (patch)
tree10f153529980e0bb8b0b15da7b9daddf04cb8d44 /lib/ExecutionEngine/MCJIT
parentf0bcecc0d59455add4367204a198949d807fe1da (diff)
downloadllvm-c68dda815e64fb2fb463318d1eaa304e22199d50.tar.gz
llvm-c68dda815e64fb2fb463318d1eaa304e22199d50.tar.bz2
llvm-c68dda815e64fb2fb463318d1eaa304e22199d50.tar.xz
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/MCJIT')
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 80110e8294..44f89cf783 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -74,9 +74,9 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji,
OS.flush();
// Load the object into the dynamic linker.
- // FIXME: It would be nice to avoid making yet another copy.
- MemoryBuffer *MB = MemoryBuffer::getMemBufferCopy(StringRef(Buffer.data(),
- Buffer.size()));
+ MemoryBuffer *MB = MemoryBuffer::getMemBuffer(StringRef(Buffer.data(),
+ Buffer.size()),
+ "", false);
if (Dyld.loadObject(MB))
report_fatal_error(Dyld.getErrorString());
// Resolve any relocations.