Module: wine Branch: master Commit: 1456b31eecfef91fc8ffc8c2de29ab69c5b5463b URL: https://gitlab.winehq.org/wine/wine/-/commit/1456b31eecfef91fc8ffc8c2de29ab6...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Feb 8 15:46:17 2024 +0100
ntdll: Use the current machine by default to create an ARM64X process.
---
dlls/ntdll/unix/loader.c | 3 ++- dlls/ntdll/unix/process.c | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 88b24420ec1..06959fa95df 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -480,7 +480,8 @@ char *get_alternate_wineloader( WORD machine )
if (machine == current_machine) return NULL;
- if (machine == IMAGE_FILE_MACHINE_AMD64) /* try the 64-bit loader */ + /* try the 64-bit loader */ + if (current_machine == IMAGE_FILE_MACHINE_I386 && machine == IMAGE_FILE_MACHINE_AMD64) { size_t len = strlen(wineloader);
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c index 71eab55920d..b58d69fb28a 100644 --- a/dlls/ntdll/unix/process.c +++ b/dlls/ntdll/unix/process.c @@ -801,7 +801,12 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_ } goto done; } - if (!machine) machine = pe_info.machine; + if (!machine) + { + machine = pe_info.machine; + if (is_arm64ec() && pe_info.is_hybrid && machine == IMAGE_FILE_MACHINE_ARM64) + machine = main_image_info.Machine; + } if (!(startup_info = create_startup_info( attr.ObjectName, process_flags, params, &pe_info, &startup_info_size ))) goto done; env_size = get_env_size( params, &winedebug );