ntdll: Only create the main module on the 32-bit side for wow64.

This commit is contained in:
Alexandre Julliard 2023-10-06 15:08:02 +02:00
parent 93a5dce013
commit de81e2ea41

View file

@ -4219,16 +4219,13 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
init_user_process_params();
load_global_options();
version_init();
get_env_var( L"WINESYSTEMDLLPATH", 0, &system_dll_path );
wm = build_main_module();
wm->ldr.LoadCount = -1;
build_ntdll_module( meminfo.AllocationBase );
if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
wm = build_main_module();
wm->ldr.LoadCount = -1;
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