about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-11-13 00:04:26 +0100
committerptitSeb <sebastien.chev@gmail.com>2022-11-13 00:04:26 +0100
commit3cb7632dc84c954c76b84bb3477de2b6ba3d599c (patch)
treee250dc582585fa5abda034c9f654ff8863263af6 /src/wrapped
parentcde8e54b513cce726008fecf2bb6b67d81da9a21 (diff)
downloadbox64-3cb7632dc84c954c76b84bb3477de2b6ba3d599c.tar.gz
box64-3cb7632dc84c954c76b84bb3477de2b6ba3d599c.zip
Also use size when selecting symbol for R_X86_64_COPY and R_X86_64_GLOB_DAT relocations
Diffstat (limited to 'src/wrapped')
-rwxr-xr-xsrc/wrapped/wrappedlibdl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c
index 4cd70df4..a0f7f4b1 100755
--- a/src/wrapped/wrappedlibdl.c
+++ b/src/wrapped/wrappedlibdl.c
@@ -192,9 +192,9 @@ int recursive_dlsym_lib(kh_libs_t* collection, library_t* lib, const char* rsymb
     // TODO: should use librarian functions instead!
     int weak;
     // look in the library itself
-    if(lib->getglobal(lib, rsymbol, start, end, &weak, version, vername, 1))
+    if(lib->getglobal(lib, rsymbol, start, end, 0, &weak, version, vername, 1))
         return 1;
-    if(lib->getweak(lib, rsymbol, start, end, &weak, version, vername, 1))
+    if(lib->getweak(lib, rsymbol, start, end, 0, &weak, version, vername, 1))
         return 1;
     // look in other libs
     int n = GetNeededLibN(lib);
@@ -238,7 +238,7 @@ void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
     if(handle==(void*)~0LL) {
         // special case, look globably but no self (RTLD_NEXT)
         elfheader_t *elf = FindElfAddress(my_context, *(uintptr_t*)R_RSP); // use return address to guess "self"
-        if(GetNoSelfSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, elf, -1, NULL)) {
+        if(GetNoSelfSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, elf, 0, -1, NULL)) {
             printf_dlsym(LOG_NEVER, "%p\n", (void*)start);
             return (void*)start;
         }
@@ -376,7 +376,7 @@ void* my_dlvsym(x64emu_t* emu, void *handle, void *symbol, const char *vername)
     if(handle==(void*)~0LL) {
         // special case, look globably but no self (RTLD_NEXT)
         elfheader_t *elf = FindElfAddress(my_context, *(uintptr_t*)R_RSP); // use return address to guess "self"
-        if(GetNoSelfSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, elf, version, vername)) {
+        if(GetNoSelfSymbolStartEnd(my_context->maplib, rsymbol, &start, &end, elf, 0, version, vername)) {
                 printf_dlsym(LOG_NEVER, "%p\n", (void*)start);
             return (void*)start;
         }