mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user