diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-23 21:17:57 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-23 21:17:57 +0100 |
| commit | d8e5c5372a1182c8e6baeeae0f172743b5137ba6 (patch) | |
| tree | ba5f4f55de1923e32371390ce394c84142d09b4e /src | |
| parent | 714ccbc3218c26e369e0da9a853fdd1f739e88ce (diff) | |
| download | box64-d8e5c5372a1182c8e6baeeae0f172743b5137ba6.tar.gz box64-d8e5c5372a1182c8e6baeeae0f172743b5137ba6.zip | |
Added a few more wrapped functions to libc
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 4 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 2 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 18 |
4 files changed, 17 insertions, 9 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index d52b1e56..6ed16cf3 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -209,6 +209,7 @@ #() iFiii #() iFiiu #() iFiip +#() iFiiO #() iFiuu #() iFiLN #() iFipu @@ -280,6 +281,7 @@ #() LFLpL #() LFpii #() LFppi +#() LFppL #() LFSpL #() pFEip #() pFEpi diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 5eba003d..8069a9dc 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -242,6 +242,7 @@ typedef int32_t (*iFiwC_t)(int32_t, int16_t, uint8_t); typedef int32_t (*iFiii_t)(int32_t, int32_t, int32_t); typedef int32_t (*iFiiu_t)(int32_t, int32_t, uint32_t); typedef int32_t (*iFiip_t)(int32_t, int32_t, void*); +typedef int32_t (*iFiiO_t)(int32_t, int32_t, int32_t); typedef int32_t (*iFiuu_t)(int32_t, uint32_t, uint32_t); typedef int32_t (*iFiLN_t)(int32_t, uintptr_t, ...); typedef int32_t (*iFipu_t)(int32_t, void*, uint32_t); @@ -313,6 +314,7 @@ typedef uintptr_t (*LFLpu_t)(uintptr_t, void*, uint32_t); typedef uintptr_t (*LFLpL_t)(uintptr_t, void*, uintptr_t); typedef uintptr_t (*LFpii_t)(void*, int32_t, int32_t); typedef uintptr_t (*LFppi_t)(void*, void*, int32_t); +typedef uintptr_t (*LFppL_t)(void*, void*, uintptr_t); typedef uintptr_t (*LFSpL_t)(void*, void*, uintptr_t); typedef void* (*pFEip_t)(x64emu_t*, int32_t, void*); typedef void* (*pFEpi_t)(x64emu_t*, void*, int32_t); @@ -1190,6 +1192,7 @@ void iFiwC(x64emu_t *emu, uintptr_t fcn) { iFiwC_t fn = (iFiwC_t)fcn; R_RAX=fn(( void iFiii(x64emu_t *emu, uintptr_t fcn) { iFiii_t fn = (iFiii_t)fcn; R_RAX=fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX); } void iFiiu(x64emu_t *emu, uintptr_t fcn) { iFiiu_t fn = (iFiiu_t)fcn; R_RAX=fn((int32_t)R_RDI, (int32_t)R_RSI, (uint32_t)R_RDX); } void iFiip(x64emu_t *emu, uintptr_t fcn) { iFiip_t fn = (iFiip_t)fcn; R_RAX=fn((int32_t)R_RDI, (int32_t)R_RSI, (void*)R_RDX); } +void iFiiO(x64emu_t *emu, uintptr_t fcn) { iFiiO_t fn = (iFiiO_t)fcn; R_RAX=fn((int32_t)R_RDI, (int32_t)R_RSI, of_convert((int32_t)R_RDX)); } void iFiuu(x64emu_t *emu, uintptr_t fcn) { iFiuu_t fn = (iFiuu_t)fcn; R_RAX=fn((int32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX); } void iFiLN(x64emu_t *emu, uintptr_t fcn) { iFiLN_t fn = (iFiLN_t)fcn; R_RAX=fn((int32_t)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX); } void iFipu(x64emu_t *emu, uintptr_t fcn) { iFipu_t fn = (iFipu_t)fcn; R_RAX=fn((int32_t)R_RDI, (void*)R_RSI, (uint32_t)R_RDX); } @@ -1261,6 +1264,7 @@ void LFLpu(x64emu_t *emu, uintptr_t fcn) { LFLpu_t fn = (LFLpu_t)fcn; R_RAX=(uin void LFLpL(x64emu_t *emu, uintptr_t fcn) { LFLpL_t fn = (LFLpL_t)fcn; R_RAX=(uintptr_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void LFpii(x64emu_t *emu, uintptr_t fcn) { LFpii_t fn = (LFpii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX); } void LFppi(x64emu_t *emu, uintptr_t fcn) { LFppi_t fn = (LFppi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX); } +void LFppL(x64emu_t *emu, uintptr_t fcn) { LFppL_t fn = (LFppL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void LFSpL(x64emu_t *emu, uintptr_t fcn) { LFSpL_t fn = (LFSpL_t)fcn; R_RAX=(uintptr_t)fn(io_convert((void*)R_RDI), (void*)R_RSI, (uintptr_t)R_RDX); } void pFEip(x64emu_t *emu, uintptr_t fcn) { pFEip_t fn = (pFEip_t)fcn; R_RAX=(uintptr_t)fn(emu, (int32_t)R_RDI, (void*)R_RSI); } void pFEpi(x64emu_t *emu, uintptr_t fcn) { pFEpi_t fn = (pFEpi_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (int32_t)R_RSI); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 2f55607e..7c0425e8 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -239,6 +239,7 @@ void iFiwC(x64emu_t *emu, uintptr_t fnc); void iFiii(x64emu_t *emu, uintptr_t fnc); void iFiiu(x64emu_t *emu, uintptr_t fnc); void iFiip(x64emu_t *emu, uintptr_t fnc); +void iFiiO(x64emu_t *emu, uintptr_t fnc); void iFiuu(x64emu_t *emu, uintptr_t fnc); void iFiLN(x64emu_t *emu, uintptr_t fnc); void iFipu(x64emu_t *emu, uintptr_t fnc); @@ -310,6 +311,7 @@ void LFLpu(x64emu_t *emu, uintptr_t fnc); void LFLpL(x64emu_t *emu, uintptr_t fnc); void LFpii(x64emu_t *emu, uintptr_t fnc); void LFppi(x64emu_t *emu, uintptr_t fnc); +void LFppL(x64emu_t *emu, uintptr_t fnc); void LFSpL(x64emu_t *emu, uintptr_t fnc); void pFEip(x64emu_t *emu, uintptr_t fnc); void pFEpi(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index c642c94d..15c8d567 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -214,12 +214,12 @@ GOM(dl_iterate_phdr, iFEpp) //Weak //GO(__dprintf_chk, //GO(drand48, //GO(drand48_r, -//GOW(dup, -//GO(__dup2, -//GOW(dup2, -//GOW(dup3, -//GO(__duplocale, -//GOW(duplocale, +GOW(dup, iFi) +GO(__dup2, iFii) +GOW(dup2, iFii) +GOW(dup3, iFiiO) +GO(__duplocale, pFp) +GOW(duplocale, pFp) //GO(dysize, //GOW(eaccess, //GO(ecb_crypt, @@ -1111,7 +1111,7 @@ GO(malloc, pFL) // need to wrap to clear allocated memory? //GOW(mbsinit, //GOW(mbsnrtowcs, //GO(__mbsnrtowcs_chk, -//GOW(mbsrtowcs, +GOW(mbsrtowcs, LFppL) //GO(__mbsrtowcs_chk, //GO(mbstowcs, //GO(__mbstowcs_chk, @@ -1500,7 +1500,7 @@ GO2(__realpath_chk, pFppv, my_realpath) //GO(remove, //GO(removexattr, //GO(remque, -//GO(rename, +GO(rename, iFpp) //GOW(renameat, //GOW(renameat2, //DATAB(_res, @@ -2103,7 +2103,7 @@ GOW(waitpid, lFlpi) //GO(wcsftime, //GO(__wcsftime_l, //GOW(wcsftime_l, -//GOI(wcslen, +GO(wcslen, LFp) //GOW(wcsncasecmp, //GO(__wcsncasecmp_l, //GOW(wcsncasecmp_l, |