about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-06-07 18:36:25 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-06-07 18:36:25 +0200
commit52d86177c5d7e70df4018ec8c9ef7a7da5bf030a (patch)
tree8c46ac2a52a25955a75301506e7240a57e6d6612 /src
parent979d1cfba984446ea692c4ee83dea763bb8edfa0 (diff)
downloadbox64-52d86177c5d7e70df4018ec8c9ef7a7da5bf030a.tar.gz
box64-52d86177c5d7e70df4018ec8c9ef7a7da5bf030a.zip
Added wrapped execv family functions
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt2
-rw-r--r--src/wrapped/generated/wrappedlibctypes.h2
-rwxr-xr-xsrc/wrapped/wrappedlibc.c4
-rwxr-xr-xsrc/wrapped/wrappedlibc_private.h4
4 files changed, 8 insertions, 4 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 890960b1..d3b2636e 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -1414,6 +1414,7 @@ wrappedlibc:
 - iFpp:
   - __vprintf_chk
   - dl_iterate_phdr
+  - execv
   - execvp
   - sigaltstack
   - swapcontext
@@ -1470,6 +1471,7 @@ wrappedlibc:
   - __isoc99_vsscanf
   - __vfprintf_chk
   - __vsscanf
+  - execve
   - vasprintf
   - vfprintf
   - vsscanf
diff --git a/src/wrapped/generated/wrappedlibctypes.h b/src/wrapped/generated/wrappedlibctypes.h
index 68d4f6e5..e011448e 100644
--- a/src/wrapped/generated/wrappedlibctypes.h
+++ b/src/wrapped/generated/wrappedlibctypes.h
@@ -82,6 +82,7 @@ typedef int64_t (*iFpippppp_t)(void*, int64_t, void*, void*, void*, void*, void*
 	GO(munmap, iFpL_t) \
 	GO(__vprintf_chk, iFpp_t) \
 	GO(dl_iterate_phdr, iFpp_t) \
+	GO(execv, iFpp_t) \
 	GO(execvp, iFpp_t) \
 	GO(sigaltstack, iFpp_t) \
 	GO(swapcontext, iFpp_t) \
@@ -122,6 +123,7 @@ typedef int64_t (*iFpippppp_t)(void*, int64_t, void*, void*, void*, void*, void*
 	GO(__isoc99_vsscanf, iFppp_t) \
 	GO(__vfprintf_chk, iFppp_t) \
 	GO(__vsscanf, iFppp_t) \
+	GO(execve, iFppp_t) \
 	GO(vasprintf, iFppp_t) \
 	GO(vfprintf, iFppp_t) \
 	GO(vsscanf, iFppp_t) \
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 48b6591b..d1426c18 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -1501,7 +1501,7 @@ EXPORT int32_t my_execv(x64emu_t* emu, const char* path, char* const argv[])
     #if 1
     if (x86 || self) {
         int skip_first = 0;
-        if(strlen(path)>=strlen("wine-preloader") && strcmp(path+strlen(path)-strlen("wine-preloader"), "wine-preloader")==0)
+        if(strlen(path)>=strlen("wine64-preloader") && strcmp(path+strlen(path)-strlen("wine64-preloader"), "wine64-preloader")==0)
             skip_first++;
         // count argv...
         int n=skip_first;
@@ -1527,7 +1527,7 @@ EXPORT int32_t my_execve(x64emu_t* emu, const char* path, char* const argv[], ch
     #if 1
     if (x86 || self) {
         int skip_first = 0;
-        if(strlen(path)>=strlen("wine-preloader") && strcmp(path+strlen(path)-strlen("wine-preloader"), "wine-preloader")==0)
+        if(strlen(path)>=strlen("wine64-preloader") && strcmp(path+strlen(path)-strlen("wine64-preloader"), "wine64-preloader")==0)
             skip_first++;
         // count argv...
         int n=skip_first;
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index 52599e3a..0263d38f 100755
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -292,8 +292,8 @@ GO(eventfd_write, iFiU)
 //GO(execl, 
 //GO(execle, 
 GOM(execlp, iFEpV)
-//GO(execv, 
-//GOW(execve, 
+GOM(execv, iFEpp)
+GOM(execve, iFEppp) //Weak
 GOM(execvp, iFEpp)
 //GOW(execvpe, 
 GO(_exit, vFi)