diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-10-01 14:06:04 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-10-01 14:06:04 +0200 |
| commit | a02873b9ee1abaf252fbc596fc6bab093587f85d (patch) | |
| tree | cd9fec11116fcac2f5b748b332b9bf832b157322 | |
| parent | ba9731838e1df5afd9c2e303ac1868aeeae07820 (diff) | |
| download | box64-a02873b9ee1abaf252fbc596fc6bab093587f85d.tar.gz box64-a02873b9ee1abaf252fbc596fc6bab093587f85d.zip | |
[TRACE] Allow both v3 and v4 of libZydis to be on the system
| -rw-r--r-- | src/emu/x64trace.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/emu/x64trace.c b/src/emu/x64trace.c index f4645c94..891867f8 100644 --- a/src/emu/x64trace.c +++ b/src/emu/x64trace.c @@ -88,7 +88,13 @@ int InitX64Trace(box64context_t* context) context->zydis = (zydis_t*)box_calloc(1, sizeof(zydis_t)); if (!context->zydis) return 1; - context->zydis->lib = dlopen("libZydis.so", RTLD_LAZY); + #ifndef ZYDIS3 + context->zydis->lib = dlopen("libZydis.so.4", RTLD_LAZY); + #else + context->zydis->lib = dlopen("libZydis.so.3", RTLD_LAZY); + #endif + if(!context->zydis->lib) + context->zydis->lib = dlopen("libZydis.so", RTLD_LAZY); if (!context->zydis->lib) { printf_log(LOG_INFO, "Failed to open libZydis: %s\n", dlerror()); return 1; |