mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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:
@@ -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())
|
||||
|
Reference in New Issue
Block a user