From 869ddcfdda59a2e5555652acb84e47d22e597c85 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 6 Dec 2024 08:53:59 +0100 Subject: [WRAPPER] Another improved dlsym wrapped function, hopefully fixing regression (should help #2115) --- src/wrapped/wrappedlibdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c index d7831740..d8b73b34 100644 --- a/src/wrapped/wrappedlibdl.c +++ b/src/wrapped/wrappedlibdl.c @@ -428,8 +428,9 @@ void* my_dlsym(x64emu_t* emu, void *handle, void *symbol) int found = 0; if(ElfGetSymTabStartEnd(my_context->elfs[0], &start, &end, rsymbol)) found = 1; + if(!found && GetGlobalSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, NULL, -1, NULL, 0, NULL)) + found = 1; if(!found && GetSymTabStartEnd(my_context->maplib, rsymbol, &start, &end)) - //if(!found && GetGlobalSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, NULL, -1, NULL, 0, NULL)) found = 1; if(found) { printf_dlsym(LOG_NEVER, "%p\n", (void*)start); -- cgit 1.4.1