From d78c6266893b44d3bd9662a4cf387d79fdb7153f Mon Sep 17 00:00:00 2001 From: GH Cao Date: Thu, 8 Dec 2022 21:37:10 +0800 Subject: Add Windows ARM64 support --- tests/test-dladdr.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/test-dladdr.c b/tests/test-dladdr.c index e2f6c01..5568f23 100644 --- a/tests/test-dladdr.c +++ b/tests/test-dladdr.c @@ -140,12 +140,21 @@ __declspec(dllexport) #endif int main(int argc, char **argv) { +#if defined(_M_ARM64) || defined(__aarch64__) + /* points to non reachable address */ + unsigned char zero_thunk_address[12] = { 0x10, 0x00, 0x00, 0x90, 0x10, 0x02, 0x40, 0xF9, 0x00, 0x02, 0x1F, 0xD6 }; + /* points to executable base */ + unsigned char invalid_thunk_address[12] = { 0x10, 0x00, 0x00, 0xb0, 0x10, 0x06, 0x47, 0xF9, 0x00, 0x02, 0x1F, 0xD6 }; + /* no import thunk */ + unsigned char no_import_thunk[12] = { 0x11, 0x00, 0x00, 0xb0, 0x31, 0x06, 0x47, 0xF9, 0x20, 0x02, 0x1F, 0xD6 }; +#else /* points to non reachable address */ unsigned char zero_thunk_address[6] = { 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; /* points to executable base */ unsigned char invalid_thunk_address[6] = { 0xFF, 0x25, 0x00, 0x00, 0x40, 0x00 }; /* no import thunk */ unsigned char no_import_thunk[6] = { 0xFF, 0x26, 0x00, 0x00, 0x40, 0x00 }; +#endif int result = 0; UNUSED(argv); -- cgit v1.2.3-55-g6feb