diff options
author | Konstantin Baladurin <k.baladurin@samsung.com> | 2019-07-05 19:36:28 +0300 |
---|---|---|
committer | 이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2019-10-15 06:54:39 +0900 |
commit | 5647236eac21fb0e01a55a12289a66bc9f874f19 (patch) | |
tree | f81eede622d29edc955cf9fe3d5dcb670ec95675 /src/pal/src/include/pal/map.hpp | |
parent | c4c19b84a37bbc750e2cc13570dd096b13abfff0 (diff) | |
download | coreclr-accepted/tizen/5.5/unified/mobile/hotfix/20201027.061818.tar.gz coreclr-accepted/tizen/5.5/unified/mobile/hotfix/20201027.061818.tar.bz2 coreclr-accepted/tizen/5.5/unified/mobile/hotfix/20201027.061818.zip |
[Tizen] Add coreclr_preload_assembly to CoreCLR host APItizen_5.5.m2_releasesubmit/tizen_5.5_mobile_hotfix/20201026.185106submit/tizen_5.5/20191031.000006submit/tizen/20191014.221258accepted/tizen/unified/20191015.012049accepted/tizen/5.5/unified/mobile/hotfix/20201027.061818accepted/tizen/5.5/unified/20191031.004944
Diffstat (limited to 'src/pal/src/include/pal/map.hpp')
-rw-r--r-- | src/pal/src/include/pal/map.hpp | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/src/pal/src/include/pal/map.hpp b/src/pal/src/include/pal/map.hpp index 7bcb20a404..16ee58ec43 100644 --- a/src/pal/src/include/pal/map.hpp +++ b/src/pal/src/include/pal/map.hpp @@ -77,15 +77,59 @@ extern "C" Map a PE format file into memory like Windows LoadLibrary() would do. Doesn't apply base relocations if the function is relocated. + There are two scenarios: + + - image could be preloaded and then MAPMapPEFile is called for it + - image is loaded with MAPMapPEFile + + In the first scenario, hFile and lpPreloadedBase are supposed to be NULL, and szPath and size - non-NULL. + In the second scenario, hFile and lpPreloadedBase are supposed to be non-NULL, and szPath and size - NULL. + + See coreclr_preload_assembly for further details. + Parameters: IN hFile - file to map + IN szPath - path to mapped file + OUT size - mapped virtual size + IN lpPreloadedBase - previously loaded base Return value: non-NULL - the base address of the mapped image NULL - error, with last error set. --*/ - void * MAPMapPEFile(HANDLE hFile); + void * MAPMapPEFile(HANDLE hFile, LPCSTR szPath, SIZE_T *size, LPVOID lpPreloadedBase); + + /*++ + MAPApplyBaseRelocationsPreloadedPEFile - + + Apply base relocations to preloaded image + + Parameters: + IN lpMappedImage - base address of preloaded image + IN virtualSize - virtual size of preloaded image + + Return value: + true - if relocations were applied successfully + false - otherwise + --*/ + + bool MAPApplyBaseRelocationsPreloadedPEFile(LPVOID lpMappedImage, SIZE_T virtualSize); + + /*++ + MAPUnmapPreloadedPEFile - + + Unmap a PE file + + Parameters: + IN lpMappedImage - address of mapped file + IN size - virtual size + + Return value: + returns TRUE if successful, FALSE otherwise + --*/ + + BOOL MAPUnmapPreloadedPEFile(LPVOID lpMappedImage, SIZE_T size); /*++ Function : |