Module: wine Branch: master Commit: fea66c28847f51de9c56e228cc08ca150f8ffba2 URL: https://source.winehq.org/git/wine.git/?a=commit;h=fea66c28847f51de9c56e228c...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Oct 29 17:42:14 2019 +0100
kernel32/tests: Enable the ExitProcess() test on ARM64.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/tests/loader.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 912e8600dd..6f143f5efd 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -683,7 +683,9 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG else ok( 0, "%u: got unexpected path %s instead of %s\n", line, wine_dbgstr_w(path), wine_dbgstr_w(load_test_name)); pLdrUnloadDll( ldr_mod ); } - else if (ldr_status == STATUS_DLL_INIT_FAILED || ldr_status == STATUS_ACCESS_VIOLATION) + else if (ldr_status == STATUS_DLL_INIT_FAILED || + ldr_status == STATUS_ACCESS_VIOLATION || + ldr_status == STATUS_ILLEGAL_INSTRUCTION) { /* some dlls with invalid entry point will crash, but this means we loaded the test dll */ ok( !expect_fallback, "%u: got test dll but expected fallback\n", line ); @@ -2953,6 +2955,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
static void test_ExitProcess(void) { +#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) #include "pshpack1.h" #ifdef __x86_64__ static struct section_data @@ -2961,13 +2964,20 @@ static void test_ExitProcess(void) void *target; BYTE jmp_rax[2]; } section_data = { { 0x48,0xb8 }, dll_entry_point, { 0xff,0xe0 } }; -#else +#elif defined(__i386__) static struct section_data { BYTE mov_eax; void *target; BYTE jmp_eax[2]; } section_data = { 0xb8, dll_entry_point, { 0xff,0xe0 } }; +#elif defined(__aarch64__) + static struct section_data + { + DWORD ldr; /* ldr x0,target */ + DWORD br; /* br x0 */ + void *target; + } section_data = { 0x58000040, 0xd61f0000, dll_entry_point }; #endif #include "poppack.h" DWORD dummy, file_align; @@ -2986,11 +2996,6 @@ static void test_ExitProcess(void) SIZE_T size; IMAGE_NT_HEADERS nt_header;
-#if !defined(__i386__) && !defined(__x86_64__) - skip("x86 specific ExitProcess test\n"); - return; -#endif - if (!pRtlDllShutdownInProgress) { win_skip("RtlDllShutdownInProgress is not available on this platform (XP+)\n"); @@ -3440,6 +3445,9 @@ if (0)
ret = DeleteFileA(dll_name); ok(ret, "DeleteFile error %d\n", GetLastError()); +#else + skip("x86 specific ExitProcess test\n"); +#endif }
static PVOID WINAPI failuredllhook(ULONG ul, DELAYLOAD_INFO* pd)