about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-07-12 22:17:50 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-07-12 22:17:50 +0200
commit3d656b500833bc3f411f89a4321c6d1ff312be93 (patch)
tree43b7e72517310d3d0f3677c8e8b00ab040b371aa /src/wrapped
parentd84afba7c86b9bef1083534b37fb40ad758c8486 (diff)
downloadbox64-3d656b500833bc3f411f89a4321c6d1ff312be93.tar.gz
box64-3d656b500833bc3f411f89a4321c6d1ff312be93.zip
Fixed ELF Signature detection
Diffstat (limited to 'src/wrapped')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 301062f0..9049851a 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -1547,7 +1547,7 @@ EXPORT int32_t my_execv(x64emu_t* emu, const char* path, char* const argv[])
     int self = isProcSelf(path, "exe");
     int x64 = FileIsX64ELF(path);
     int x86 = my_context->box86path?FileIsX86ELF(path):0;
-    printf_log(LOG_DEBUG, "execv(\"%s\", %p) is x64=%d\n", path, argv, x64);
+    printf_log(LOG_DEBUG, "execv(\"%s\", %p) is x64=%d x86=%d\n", path, argv, x64, x86);
     #if 1
     if (x64 || x86 || self) {
         int skip_first = 0;
@@ -1560,7 +1560,7 @@ EXPORT int32_t my_execv(x64emu_t* emu, const char* path, char* const argv[])
         newargv[0] = x86?emu->context->box86path:emu->context->box64path;
         memcpy(newargv+1, argv+skip_first, sizeof(char*)*(n+1));
         if(self) newargv[1] = emu->context->fullpath;
-        printf_log(LOG_DEBUG, " => execv(\"%s\", %p [\"%s\", \"%s\", \"%s\"...:%d])\n", emu->context->box64path, newargv, newargv[0], n?newargv[1]:"", (n>1)?newargv[2]:"",n);
+        printf_log(LOG_DEBUG, " => execv(\"%s\", %p [\"%s\", \"%s\", \"%s\"...:%d])\n", newargv[0], newargv, newargv[0], n?newargv[1]:"", (n>1)?newargv[2]:"",n);
         int ret = execv(newargv[0], (char* const*)newargv);
         free(newargv);
         return ret;
@@ -1574,7 +1574,7 @@ EXPORT int32_t my_execve(x64emu_t* emu, const char* path, char* const argv[], ch
     int self = isProcSelf(path, "exe");
     int x64 = FileIsX64ELF(path);
     int x86 = my_context->box86path?FileIsX86ELF(path):0;
-    printf_log(LOG_DEBUG, "execv(\"%s\", %p) is x64=%d\n", path, argv, x64);
+    printf_log(LOG_DEBUG, "execv(\"%s\", %p) is x64=%d x86=%d\n", path, argv, x64, x86);
     #if 1
     if (x64 || x86 || self) {
         int skip_first = 0;
@@ -1587,7 +1587,7 @@ EXPORT int32_t my_execve(x64emu_t* emu, const char* path, char* const argv[], ch
         newargv[0] = x86?emu->context->box86path:emu->context->box64path;
         memcpy(newargv+1, argv+skip_first, sizeof(char*)*(n+1));
         if(self) newargv[1] = emu->context->fullpath;
-        printf_log(LOG_DEBUG, " => execv(\"%s\", %p [\"%s\", \"%s\", \"%s\"...:%d])\n", emu->context->box64path, newargv, newargv[0], n?newargv[1]:"", (n>1)?newargv[2]:"",n);
+        printf_log(LOG_DEBUG, " => execv(\"%s\", %p [\"%s\", \"%s\", \"%s\"...:%d])\n", newargv[0], newargv, newargv[0], n?newargv[1]:"", (n>1)?newargv[2]:"",n);
         int ret = execve(newargv[0], (char* const*)newargv, envp);
         free(newargv);
         return ret;