Module: wine Branch: master Commit: c98d0eaac82934c848d9894930512eb4a3ab82c5 URL: https://gitlab.winehq.org/wine/wine/-/commit/c98d0eaac82934c848d9894930512eb...
Author: Brendan Shanks bshanks@codeweavers.com Date: Tue Jan 23 15:20:06 2024 -0800
ntdll: Only build the main module and ntdll once on Wow64.
Fixes +relay for applications that use multiple threads when running in new Wow64.
---
dlls/ntdll/loader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 8030e3b7892..4fc8af2662e 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -4131,9 +4131,6 @@ void (WINAPI *pWow64PrepareForException)( EXCEPTION_RECORD *rec, CONTEXT *contex
static void init_wow64( CONTEXT *context ) { - build_wow64_main_module(); - build_ntdll_module(); - if (!imports_fixup_done) { HMODULE wow64; @@ -4141,6 +4138,9 @@ static void init_wow64( CONTEXT *context ) NTSTATUS status; static const WCHAR wow64_path[] = L"C:\windows\system32\wow64.dll";
+ build_wow64_main_module(); + build_ntdll_module(); + if ((status = load_dll( NULL, wow64_path, 0, &wm, FALSE ))) { ERR( "could not load %s, status %lx\n", debugstr_w(wow64_path), status );