aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGH Cao <driver1998.ms@outlook.com>2022-12-08 21:37:10 +0800
committerGH Cao <driver1998.ms@outlook.com>2022-12-27 22:10:21 +0800
commitd78c6266893b44d3bd9662a4cf387d79fdb7153f (patch)
treeae319ec881c2ffb7ccdfe4c0cadad1cb60a53c26 /tests
parent8dceebdac727a2f9d7022a71b7800589e662d9b8 (diff)
downloaddlfcn-win32-d78c6266893b44d3bd9662a4cf387d79fdb7153f.tar.gz
dlfcn-win32-d78c6266893b44d3bd9662a4cf387d79fdb7153f.tar.bz2
dlfcn-win32-d78c6266893b44d3bd9662a4cf387d79fdb7153f.zip
Add Windows ARM64 support
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dladdr.c9
1 files changed, 9 insertions, 0 deletions
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)
140#endif 140#endif
141int main(int argc, char **argv) 141int main(int argc, char **argv)
142{ 142{
143#if defined(_M_ARM64) || defined(__aarch64__)
144 /* points to non reachable address */
145 unsigned char zero_thunk_address[12] = { 0x10, 0x00, 0x00, 0x90, 0x10, 0x02, 0x40, 0xF9, 0x00, 0x02, 0x1F, 0xD6 };
146 /* points to executable base */
147 unsigned char invalid_thunk_address[12] = { 0x10, 0x00, 0x00, 0xb0, 0x10, 0x06, 0x47, 0xF9, 0x00, 0x02, 0x1F, 0xD6 };
148 /* no import thunk */
149 unsigned char no_import_thunk[12] = { 0x11, 0x00, 0x00, 0xb0, 0x31, 0x06, 0x47, 0xF9, 0x20, 0x02, 0x1F, 0xD6 };
150#else
143 /* points to non reachable address */ 151 /* points to non reachable address */
144 unsigned char zero_thunk_address[6] = { 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; 152 unsigned char zero_thunk_address[6] = { 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 };
145 /* points to executable base */ 153 /* points to executable base */
146 unsigned char invalid_thunk_address[6] = { 0xFF, 0x25, 0x00, 0x00, 0x40, 0x00 }; 154 unsigned char invalid_thunk_address[6] = { 0xFF, 0x25, 0x00, 0x00, 0x40, 0x00 };
147 /* no import thunk */ 155 /* no import thunk */
148 unsigned char no_import_thunk[6] = { 0xFF, 0x26, 0x00, 0x00, 0x40, 0x00 }; 156 unsigned char no_import_thunk[6] = { 0xFF, 0x26, 0x00, 0x00, 0x40, 0x00 };
157#endif
149 int result = 0; 158 int result = 0;
150 UNUSED(argv); 159 UNUSED(argv);
151 160