Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/coreclr/inc/CrstTypes.def1
-rw-r--r--src/coreclr/inc/crsttypes.h2
-rw-r--r--src/coreclr/vm/ceeload.cpp8
-rw-r--r--src/coreclr/vm/domainassembly.cpp8
4 files changed, 10 insertions, 9 deletions
diff --git a/src/coreclr/inc/CrstTypes.def b/src/coreclr/inc/CrstTypes.def
index 0335e4965f1..279118f3012 100644
--- a/src/coreclr/inc/CrstTypes.def
+++ b/src/coreclr/inc/CrstTypes.def
@@ -206,6 +206,7 @@ Crst ExecutableAllocatorLock
End
Crst ExecuteManRangeLock
+ AcquiredAfter NativeImageEagerFixups
End
Crst FCall
diff --git a/src/coreclr/inc/crsttypes.h b/src/coreclr/inc/crsttypes.h
index d462cbd3c88..815b2636466 100644
--- a/src/coreclr/inc/crsttypes.h
+++ b/src/coreclr/inc/crsttypes.h
@@ -216,7 +216,7 @@ int g_rgCrstLevelMap[] =
4, // CrstModuleLookupTable
0, // CrstMulticoreJitHash
13, // CrstMulticoreJitManager
- 0, // CrstNativeImageEagerFixups
+ 3, // CrstNativeImageEagerFixups
0, // CrstNativeImageLoad
0, // CrstNls
0, // CrstNotifyGdb
diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp
index c48f2fcb596..aeb4868ee2a 100644
--- a/src/coreclr/vm/ceeload.cpp
+++ b/src/coreclr/vm/ceeload.cpp
@@ -4703,6 +4703,14 @@ void Module::RunEagerFixupsUnlocked()
}
}
}
+
+ TADDR base = dac_cast<TADDR>(pNativeImage->GetBase());
+
+ ExecutionManager::AddCodeRange(
+ base, base + (TADDR)pNativeImage->GetVirtualSize(),
+ ExecutionManager::GetReadyToRunJitManager(),
+ RangeSection::RANGE_SECTION_READYTORUN,
+ this /* pHeapListOrZapModule */);
}
#endif // !DACCESS_COMPILE
diff --git a/src/coreclr/vm/domainassembly.cpp b/src/coreclr/vm/domainassembly.cpp
index b8b19bb08b1..47c0fd53a74 100644
--- a/src/coreclr/vm/domainassembly.cpp
+++ b/src/coreclr/vm/domainassembly.cpp
@@ -532,14 +532,6 @@ void DomainAssembly::EagerFixups()
{
GetModule()->RunEagerFixups();
- PEImageLayout * pLayout = GetModule()->GetReadyToRunInfo()->GetImage();
-
- TADDR base = dac_cast<TADDR>(pLayout->GetBase());
-
- ExecutionManager::AddCodeRange(base, base + (TADDR)pLayout->GetVirtualSize(),
- ExecutionManager::GetReadyToRunJitManager(),
- RangeSection::RANGE_SECTION_READYTORUN,
- GetModule() /* (void *)pLayout */);
}
#endif // FEATURE_READYTORUN
}