Module: wine Branch: master Commit: de81e2ea41b27a14f88177639c5b5d35a210b5bd URL: https://gitlab.winehq.org/wine/wine/-/commit/de81e2ea41b27a14f88177639c5b5d3...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Oct 6 15:08:02 2023 +0200
ntdll: Only create the main module on the 32-bit side for wow64.
---
dlls/ntdll/loader.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index cfb1e833cc6..2bf1437623f 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -4219,16 +4219,13 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR init_user_process_params(); load_global_options(); version_init(); + build_ntdll_module( meminfo.AllocationBase );
- get_env_var( L"WINESYSTEMDLLPATH", 0, &system_dll_path ); + if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
wm = build_main_module(); wm->ldr.LoadCount = -1;
- build_ntdll_module( meminfo.AllocationBase ); - - if (NtCurrentTeb()->WowTebOffset) init_wow64( context ); - if ((status = load_dll( NULL, L"kernel32.dll", 0, &kernel32, FALSE )) != STATUS_SUCCESS) { MESSAGE( "wine: could not load kernel32.dll, status %lx\n", status ); @@ -4245,6 +4242,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
actctx_init(); locale_init(); + get_env_var( L"WINESYSTEMDLLPATH", 0, &system_dll_path ); if (wm->ldr.Flags & LDR_COR_ILONLY) status = fixup_imports_ilonly( wm, NULL, entry ); else