about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-07-08 15:10:28 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-07-08 15:10:28 +0200
commitb7a2d59a61809739f86c2840294adb000a40f38f (patch)
tree5b703def507c98196142416420eda3cc37709aa5 /src
parent25c8453353201673a2ad538386465ebc42da9d4a (diff)
downloadbox64-b7a2d59a61809739f86c2840294adb000a40f38f.tar.gz
box64-b7a2d59a61809739f86c2840294adb000a40f38f.zip
Some more small improvments to BOX64_MALLOC_HACK=2
Diffstat (limited to 'src')
-rw-r--r--src/mallochook.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mallochook.c b/src/mallochook.c
index ff4b7cae..eb954efa 100644
--- a/src/mallochook.c
+++ b/src/mallochook.c
@@ -769,9 +769,6 @@ static void addRelocJmp(void* offs, void* where, size_t size, const char* name,
     if(malloc_hack_2 && !*real) {
         *real = (uintptr_t)offs;
     }
-    AddSymbol(h->mapsymbols, name, (uintptr_t)where, size, 1, NULL);
-    AddSymbol(h->mapsymbols, name, (uintptr_t)offs, size, 0, NULL);
-    AddSymbol(h->localsymbols, name, (uintptr_t)offs, size, 0, NULL);
     addAlternate(offs, where);
 }
 
@@ -811,7 +808,7 @@ void checkHookedSymbols(elfheader_t* h)
             uintptr_t offs = h->DynSym[i].st_value + h->delta;
             size_t sz = h->DynSym[i].st_size;
             if(bind!=STB_LOCAL && bind!=STB_WEAK) {
-                #define GO(A, B) if(!strcmp(symname, "__libc_" #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, "__libc_" #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, "__libc_" #A, h, &real_##A);}
+                #define GO(A, B) if(!strcmp(symname, "__libc_" #A)) {uintptr_t alt = AddCheckBridge(my_context->system, B, A, 0, #A); printf_log(LOG_DEBUG, "Redirecting %s function from %p (%s)\n", symname, (void*)offs, ElfName(h)); addRelocJmp((void*)offs, (void*)alt, sz, "__libc_" #A, h, &real_##A);}
                 #define GO2(A, B)
                 SUPER()
                 #undef GO