From: Martin Storsjö martin@martin.st
The new wow64 mode probably won't work though, as it's not easily doable to switch between arm and aarch64 execution modes within a process.
Since 8ac411ed6dc7a9390178a01e6f07a963a593d406, the get_{native,wow}_context functions exist and need to return the right thing in the arm implementation.
Since ae8562ed2277a5c051e131dc317e94aa3d5413c8 and 1456b31eecfef91fc8ffc8c2de29ab69c5b5463b we need to include the arm+arm64 case for starting the right wineloader. --- dlls/ntdll/unix/loader.c | 3 ++- dlls/ntdll/unix/signal_arm.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 68cd4f50420..c97aa3e5a48 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -514,7 +514,8 @@ char *get_alternate_wineloader( WORD machine ) if (machine == current_machine) return NULL;
/* try the 64-bit loader */ - if (current_machine == IMAGE_FILE_MACHINE_I386 && machine == IMAGE_FILE_MACHINE_AMD64) + if ((current_machine == IMAGE_FILE_MACHINE_I386 && machine == IMAGE_FILE_MACHINE_AMD64) || + (current_machine == IMAGE_FILE_MACHINE_ARMNT && machine == IMAGE_FILE_MACHINE_ARM64)) { size_t len = strlen(wineloader);
diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index c9ae492597d..d9bda6a8d2c 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -409,7 +409,7 @@ NTSTATUS signal_set_full_context( CONTEXT *context ) */ void *get_native_context( CONTEXT *context ) { - return context; + return is_old_wow64() ? NULL : context; }
@@ -418,7 +418,7 @@ void *get_native_context( CONTEXT *context ) */ void *get_wow_context( CONTEXT *context ) { - return NULL; + return is_old_wow64() ? context : NULL; }