From 20e0fd6e991edf5c6b5c6c7c22632d16d346a690 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 28 Sep 2020 19:38:17 +0200 Subject: [PATCH] ntdll: Delay ntdll.dll loading until more initialization is done. Signed-off-by: Alexandre Julliard --- dlls/ntdll/unix/loader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index e7a7c96a974..b8500b5772c 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -1577,6 +1577,8 @@ static void start_main_thread(void) init_cpu_info(); init_files(); NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); + load_ntdll(); + load_libwine(); status = p__wine_set_unix_funcs( NTDLL_UNIXLIB_VERSION, &unix_funcs ); if (status) exec_process( status ); server_init_process_done(); @@ -1785,10 +1787,7 @@ void __wine_main( int argc, char *argv[], char *envp[] ) #endif virtual_init(); - load_ntdll(); - init_environment( argc, argv, envp ); - load_libwine(); #ifdef __APPLE__ apple_main_thread();