diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-05-19 11:18:27 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-05-19 11:18:27 +0200 |
| commit | d0da2c24fb072e3a760044780ebb5a08df41aff9 (patch) | |
| tree | 8e6c4b4075596ce5811069e0f276ab531e7df512 /src | |
| parent | 152a8a4666f253d367dc664bfd329edf53b3e5b3 (diff) | |
| download | box64-d0da2c24fb072e3a760044780ebb5a08df41aff9.tar.gz box64-d0da2c24fb072e3a760044780ebb5a08df41aff9.zip | |
Added some more libc wrapped functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 1 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibctypes.h | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 1 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 6 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 6 |
6 files changed, 15 insertions, 3 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 888129cf..3bcbd35e 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -380,6 +380,7 @@ #() pFppp #() pFpOM #() pFSpl +#() vFEipp #() vFEipV #() vFEpii #() vFEpip diff --git a/src/wrapped/generated/wrappedlibctypes.h b/src/wrapped/generated/wrappedlibctypes.h index 4ca1ad4c..cd3a17b7 100644 --- a/src/wrapped/generated/wrappedlibctypes.h +++ b/src/wrapped/generated/wrappedlibctypes.h @@ -26,6 +26,7 @@ typedef int64_t (*iFSp_t)(void*, void*); typedef void* (*pFip_t)(int64_t, void*); typedef void* (*pFpi_t)(void*, int64_t); typedef void* (*pFpp_t)(void*, void*); +typedef void (*vFipp_t)(int64_t, void*, void*); typedef void (*vFipV_t)(int64_t, void*, void*); typedef void (*vFpii_t)(void*, int64_t, int64_t); typedef void (*vFpup_t)(void*, uint64_t, void*); @@ -97,6 +98,7 @@ typedef int64_t (*iFpippppp_t)(void*, int64_t, void*, void*, void*, void*, void* GO(fopen, pFpp_t) \ GO(fopen64, pFpp_t) \ GO(realpath, pFpp_t) \ + GO(vsyslog, vFipp_t) \ GO(syslog, vFipV_t) \ GO(backtrace_symbols_fd, vFpii_t) \ GO(_ITM_addUserCommitAction, vFpup_t) \ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 2f3a93d2..f856f596 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -414,6 +414,7 @@ typedef void* (*pFppL_t)(void*, void*, uintptr_t); typedef void* (*pFppp_t)(void*, void*, void*); typedef void* (*pFpOM_t)(void*, int32_t, ...); typedef void* (*pFSpl_t)(void*, void*, intptr_t); +typedef void (*vFEipp_t)(x64emu_t*, int64_t, void*, void*); typedef void (*vFEipV_t)(x64emu_t*, int64_t, void*, void*); typedef void (*vFEpii_t)(x64emu_t*, void*, int64_t, int64_t); typedef void (*vFEpip_t)(x64emu_t*, void*, int64_t, void*); @@ -1645,6 +1646,7 @@ void pFppL(x64emu_t *emu, uintptr_t fcn) { pFppL_t fn = (pFppL_t)fcn; R_RAX=(uin void pFppp(x64emu_t *emu, uintptr_t fcn) { pFppp_t fn = (pFppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } void pFpOM(x64emu_t *emu, uintptr_t fcn) { pFpOM_t fn = (pFpOM_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, of_convert((int32_t)R_RSI), (void*)R_RDX, (void*)R_RCX); } void pFSpl(x64emu_t *emu, uintptr_t fcn) { pFSpl_t fn = (pFSpl_t)fcn; R_RAX=(uintptr_t)fn(io_convert((void*)R_RDI), (void*)R_RSI, (intptr_t)R_RDX); } +void vFEipp(x64emu_t *emu, uintptr_t fcn) { vFEipp_t fn = (vFEipp_t)fcn; fn(emu, (int64_t)R_RDI, (void*)R_RSI, (void*)R_RDX); } void vFEipV(x64emu_t *emu, uintptr_t fcn) { vFEipV_t fn = (vFEipV_t)fcn; fn(emu, (int64_t)R_RDI, (void*)R_RSI, (void*)(R_RSP + 8)); } void vFEpii(x64emu_t *emu, uintptr_t fcn) { vFEpii_t fn = (vFEpii_t)fcn; fn(emu, (void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX); } void vFEpip(x64emu_t *emu, uintptr_t fcn) { vFEpip_t fn = (vFEpip_t)fcn; fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index a64be1dd..5e320dfa 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -410,6 +410,7 @@ void pFppL(x64emu_t *emu, uintptr_t fnc); void pFppp(x64emu_t *emu, uintptr_t fnc); void pFpOM(x64emu_t *emu, uintptr_t fnc); void pFSpl(x64emu_t *emu, uintptr_t fnc); +void vFEipp(x64emu_t *emu, uintptr_t fnc); void vFEipV(x64emu_t *emu, uintptr_t fnc); void vFEpii(x64emu_t *emu, uintptr_t fnc); void vFEpip(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index caf22c3c..0e845423 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -840,6 +840,12 @@ EXPORT void my___syslog_chk(x64emu_t* emu, int priority, int flags, const char* PREPARE_VALIST; return vsyslog(priority, fmt, VARARGS); } +EXPORT void my_vsyslog(x64emu_t* emu, int priority, const char* fmt, x64_va_list_t b) +{ + (void)emu; + CONVERT_VALIST(b); + return vsyslog(priority, fmt, VARARGS); +} EXPORT int my___swprintf_chk(x64emu_t* emu, void* s, size_t n, int32_t flag, size_t slen, void* fmt, uint64_t* b) { diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index fc115393..33024bbc 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1627,7 +1627,7 @@ GOM(setjmp, iFEp) GO(setlinebuf, vFp) GO(setlocale, pFip) //GO(setlogin, -//GO(setlogmask, +GO(setlogmask, iFi) //GO(__setmntent, //GOW(setmntent, //GO(setnetent, @@ -1648,7 +1648,7 @@ GOW(setrlimit64, iFip) //GO(setrpcent, //GO(setservent, //GO(setsgent, -//GOW(setsid, +GOW(setsid, pFv) GOW(setsockopt, iFiiipu) //GO(setsourcefilter, //GO(setspent, @@ -2073,7 +2073,7 @@ GOM(vsscanf, iFEppp) //Weak GOM(vswprintf, iFEpuppp) // Weak GOM(__vswprintf_chk, iFEpuvvppp) // Weak //GO(vswscanf, -//GO(vsyslog, +GOM(vsyslog, vFEipp) //GO(__vsyslog_chk, //GO(vtimes, //GO(vwarn, |