Hook up the MCJIT to the RuntimeDyld library.

Lots of cleanup to make the interfaces prettier, use the JITMemoryManager,
handle multiple functions and modules, etc.. This gets far enough that
the MCJIT compiles and runs code, though.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128052 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2011-03-22 01:06:42 +00:00
parent bd17478f2f
commit f922910494
3 changed files with 22 additions and 3 deletions

View File

@@ -145,6 +145,10 @@ loadSegment32(const MachOObject *Obj,
SymbolTable[Name] = Address;
}
// We've loaded the section; now mark the functions in it as executable.
// FIXME: We really should use the JITMemoryManager for this.
sys::Memory::setRangeExecutable(Data.base(), Data.size());
delete SectionBases;
return false;
}
@@ -220,12 +224,14 @@ loadSegment64(const MachOObject *Obj,
SymbolTable[Name] = Address;
}
// We've loaded the section; now mark the functions in it as executable.
// FIXME: We really should use the JITMemoryManager for this.
sys::Memory::setRangeExecutable(Data.base(), Data.size());
delete SectionBases;
return false;
}
bool RuntimeDyldImpl::loadObject(MemoryBuffer *InputBuffer) {
// If the linker is in an error state, don't do anything.
if (hasError())