mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Adding multiple object support to MCJIT EH frame handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192504 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -178,14 +178,12 @@ void MCJIT::finalizeLoadedModules() {
|
||||
|
||||
if (ModuleStates[M].hasBeenLoaded() &&
|
||||
!ModuleStates[M].hasBeenFinalized()) {
|
||||
// FIXME: This should be module specific!
|
||||
StringRef EHData = Dyld.getEHFrameSection();
|
||||
if (!EHData.empty())
|
||||
MemMgr.registerEHFrames(EHData);
|
||||
ModuleStates[M] = ModuleFinalized;
|
||||
}
|
||||
}
|
||||
|
||||
Dyld.registerEHFrames();
|
||||
|
||||
// Set page permissions.
|
||||
MemMgr.finalizeMemory();
|
||||
}
|
||||
@@ -221,14 +219,12 @@ void MCJIT::finalizeObject() {
|
||||
|
||||
if (ModuleStates[M].hasBeenLoaded() &&
|
||||
!ModuleStates[M].hasBeenFinalized()) {
|
||||
// FIXME: This should be module specific!
|
||||
StringRef EHData = Dyld.getEHFrameSection();
|
||||
if (!EHData.empty())
|
||||
MemMgr.registerEHFrames(EHData);
|
||||
ModuleStates[M] = ModuleFinalized;
|
||||
}
|
||||
}
|
||||
|
||||
Dyld.registerEHFrames();
|
||||
|
||||
// Set page permissions.
|
||||
MemMgr.finalizeMemory();
|
||||
}
|
||||
@@ -248,10 +244,7 @@ void MCJIT::finalizeModule(Module *M) {
|
||||
// Resolve any outstanding relocations.
|
||||
Dyld.resolveRelocations();
|
||||
|
||||
// FIXME: Should this be module specific?
|
||||
StringRef EHData = Dyld.getEHFrameSection();
|
||||
if (!EHData.empty())
|
||||
MemMgr.registerEHFrames(EHData);
|
||||
Dyld.registerEHFrames();
|
||||
|
||||
// Set page permissions.
|
||||
MemMgr.finalizeMemory();
|
||||
|
||||
Reference in New Issue
Block a user