diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-09-11 14:27:21 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-09-11 14:27:21 +0200 |
| commit | 1f3729822a2eed41c907cc6e9ffa275c1b772e3f (patch) | |
| tree | 497e5517f3c169e790ba5afcdc394d068a22e8df /src/tools/bridge.c | |
| parent | a27283aa9b8a738fea10052df50bd2c7313fa043 (diff) | |
| download | box64-1f3729822a2eed41c907cc6e9ffa275c1b772e3f.tar.gz box64-1f3729822a2eed41c907cc6e9ffa275c1b772e3f.zip | |
Some more wrapping on AtkUtils
Diffstat (limited to 'src/tools/bridge.c')
| -rwxr-xr-x | src/tools/bridge.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/bridge.c b/src/tools/bridge.c index 8c9070eb..cfbcdeb5 100755 --- a/src/tools/bridge.c +++ b/src/tools/bridge.c @@ -14,6 +14,7 @@ #include "debug.h" #include "x64emu.h" #include "box64context.h" +#include "elfloader.h" #ifdef DYNAREC #include "dynablock.h" #endif @@ -180,9 +181,11 @@ void* GetNativeFnc(uintptr_t fnc) { if(!fnc) return NULL; // check if function exist in some loaded lib - Dl_info info; - if(dladdr((void*)fnc, &info)) - return (void*)fnc; + if(!FindElfAddress(my_context, fnc)) { + Dl_info info; + if(dladdr((void*)fnc, &info)) + return (void*)fnc; + } if(!getProtection(fnc)) return NULL; // check if it's an indirect jump |