diff options
author | midipix <writeonce@midipix.org> | 2017-10-18 04:09:08 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-10-19 18:18:47 -0400 |
commit | aa2c177ebbcb9f367f63263f2b0071bdc860975a (patch) | |
tree | 3e52cf8e0891c4f94646924a4d8910e3fdcd0c96 | |
parent | dab206afd4523f16fcda9e8c72dfb1fdfc4c4687 (diff) | |
download | pemagine-aa2c177ebbcb9f367f63263f2b0071bdc860975a.tar.bz2 pemagine-aa2c177ebbcb9f367f63263f2b0071bdc860975a.tar.xz |
ldso: pe_load_framework_loader(): refactored.
-rw-r--r-- | src/ldso/pe_load_framework_loader.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/ldso/pe_load_framework_loader.c b/src/ldso/pe_load_framework_loader.c index 3e3e903..e70c183 100644 --- a/src/ldso/pe_load_framework_loader.c +++ b/src/ldso/pe_load_framework_loader.c @@ -114,12 +114,12 @@ static int32_t pe_get_device_dos_drive_letter( } -int32_t pe_load_framework_loader( - void ** baseaddr, - struct pe_framework_runtime_data * rtdata, - uintptr_t * buffer, - uint32_t bufsize, - uint32_t * flags) +static int32_t pe_load_library_impl( + void ** baseaddr, + void * hdsolib, + uintptr_t * buffer, + uint32_t bufsize, + uint32_t * flags) { int32_t status; struct pe_unicode_str path; @@ -152,7 +152,7 @@ int32_t pe_load_framework_loader( /* loader native path */ if ((status = zw_query_object( - rtdata->hloader, + hdsolib, OS_OBJECT_NAME_INFORMATION, buffer,bufsize,&len))) return status; @@ -244,3 +244,18 @@ int32_t pe_load_framework_loader( ldrdir,flags, &path,baseaddr); } + + +int32_t pe_load_framework_loader( + void ** baseaddr, + struct pe_framework_runtime_data * rtdata, + uintptr_t * buffer, + uint32_t bufsize, + uint32_t * sysflags) +{ + return pe_load_library_impl( + baseaddr, + rtdata->hloader, + buffer,bufsize, + sysflags); +} |