ntdll: Only build the wow64 function table on 64-bit.

This commit is contained in:
Alexandre Julliard 2022-12-02 11:31:13 +01:00
parent 6a4e0d60fa
commit 3242676e2e
2 changed files with 11 additions and 0 deletions

View file

@ -2136,6 +2136,8 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
};
#ifdef _WIN64
static NTSTATUS wow64_load_so_dll( void *args ) { return STATUS_INVALID_IMAGE_FORMAT; }
static NTSTATUS wow64_init_builtin_dll( void *args ) { return STATUS_UNSUCCESSFUL; }
static NTSTATUS wow64_unwind_builtin_dll( void *args ) { return STATUS_UNSUCCESSFUL; }
@ -2151,6 +2153,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
system_time_precise,
};
#endif /* _WIN64 */
/***********************************************************************
* start_main_thread

View file

@ -647,7 +647,11 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun
if (module == ntdll_module)
{
#ifdef _WIN64
*funcs = wow ? __wine_unix_call_wow64_funcs : __wine_unix_call_funcs;
#else
*funcs = __wine_unix_call_funcs;
#endif
return STATUS_SUCCESS;
}
@ -657,7 +661,11 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun
if (builtin->module != module) continue;
if (builtin->unix_path && (p = strrchr( builtin->unix_path, '/' )) && !strcmp( p, "/ntdll.so" ))
{
#ifdef _WIN64
*funcs = wow ? __wine_unix_call_wow64_funcs : __wine_unix_call_funcs;
#else
*funcs = __wine_unix_call_funcs;
#endif
status = STATUS_SUCCESS;
break;
}