diff options
author | Silvio Traversaro <silvio@traversaro.it> | 2022-12-28 15:23:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-28 15:23:51 +0100 |
commit | 6444294ee354796536c34b54e154c0538a4d1eaf (patch) | |
tree | ae319ec881c2ffb7ccdfe4c0cadad1cb60a53c26 /tests | |
parent | 8dceebdac727a2f9d7022a71b7800589e662d9b8 (diff) | |
parent | d78c6266893b44d3bd9662a4cf387d79fdb7153f (diff) | |
download | dlfcn-win32-6444294ee354796536c34b54e154c0538a4d1eaf.tar.gz dlfcn-win32-6444294ee354796536c34b54e154c0538a4d1eaf.tar.bz2 dlfcn-win32-6444294ee354796536c34b54e154c0538a4d1eaf.zip |
Merge pull request #107 from driver1998/arm64
Add Windows ARM64 support
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-dladdr.c | 9 |
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 |
141 | int main(int argc, char **argv) | 141 | int 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 | ||