diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-12-15 14:15:34 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-12-15 14:15:34 +0100 |
| commit | 5ce3e2991360771bf5ed9b2b8c7228c742e5134b (patch) | |
| tree | fe26d176af47ca77d3f2ef8aba021164b6056a5f /src/wrapped32/generated | |
| parent | 1a7cff559aa23e935a12cedb6ce84fd81e4548f2 (diff) | |
| download | box64-5ce3e2991360771bf5ed9b2b8c7228c742e5134b.tar.gz box64-5ce3e2991360771bf5ed9b2b8c7228c742e5134b.zip | |
[BOX32][WRAPPER] More work on libc wrapping, and some new syscall too
Diffstat (limited to 'src/wrapped32/generated')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 5 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibresolvtypes32.h | 4 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 2 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 1 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index 91559650..2bc07315 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -909,7 +909,6 @@ #() iFpCCC -> iFpCCC #() iFpWWu -> iFpWWu #() iEpuiL -> iEpuiL -#() iFpuip -> iFpuip #() iFpuuU -> iFpuuU #() iFpuLp -> iFpuLp #() iFpupi -> iFpupi @@ -2395,6 +2394,10 @@ wrappedlibpthread: - iEBh_ppp: - pthread_create wrappedlibresolv: +- iFpip: + - ns_initparse +- iFpuip: + - ns_parserr - iEpiipi: - __res_query - res_query diff --git a/src/wrapped32/generated/wrappedlibresolvtypes32.h b/src/wrapped32/generated/wrappedlibresolvtypes32.h index 3df66b40..0668da67 100644 --- a/src/wrapped32/generated/wrappedlibresolvtypes32.h +++ b/src/wrapped32/generated/wrappedlibresolvtypes32.h @@ -11,10 +11,14 @@ #define ADDED_FUNCTIONS() #endif +typedef int32_t (*iFpip_t)(void*, int32_t, void*); +typedef int32_t (*iFpuip_t)(void*, uint32_t, int32_t, void*); typedef int32_t (*iEpiipi_t)(void*, int32_t, int32_t, void*, int32_t); typedef int32_t (*iFpiipi_t)(void*, int32_t, int32_t, void*, int32_t); #define SUPER() ADDED_FUNCTIONS() \ + GO(ns_initparse, iFpip_t) \ + GO(ns_parserr, iFpuip_t) \ GO(__res_query, iEpiipi_t) \ GO(res_query, iEpiipi_t) \ GO(res_search, iEpiipi_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 19302856..ef8eecc7 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -1000,7 +1000,6 @@ typedef int32_t (*iFpipp_t)(void*, int32_t, void*, void*); typedef int32_t (*iFpCCC_t)(void*, uint8_t, uint8_t, uint8_t); typedef int32_t (*iFpWWu_t)(void*, uint16_t, uint16_t, uint32_t); typedef int32_t (*iEpuiL_t)(void*, uint32_t, int32_t, uintptr_t); -typedef int32_t (*iFpuip_t)(void*, uint32_t, int32_t, void*); typedef int32_t (*iFpuuU_t)(void*, uint32_t, uint32_t, uint64_t); typedef int32_t (*iFpuLp_t)(void*, uint32_t, uintptr_t, void*); typedef int32_t (*iFpupi_t)(void*, uint32_t, void*, int32_t); @@ -2773,7 +2772,6 @@ void iFpipp_32(x64emu_t *emu, uintptr_t fcn) { iFpipp_t fn = (iFpipp_t)fcn; R_EA void iFpCCC_32(x64emu_t *emu, uintptr_t fcn) { iFpCCC_t fn = (iFpCCC_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint8_t, R_ESP + 8), from_ptri(uint8_t, R_ESP + 12), from_ptri(uint8_t, R_ESP + 16)); } void iFpWWu_32(x64emu_t *emu, uintptr_t fcn) { iFpWWu_t fn = (iFpWWu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint16_t, R_ESP + 8), from_ptri(uint16_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16)); } void iEpuiL_32(x64emu_t *emu, uintptr_t fcn) { iEpuiL_t fn = (iEpuiL_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16))); emu->libc_err = errno; } -void iFpuip_32(x64emu_t *emu, uintptr_t fcn) { iFpuip_t fn = (iFpuip_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFpuuU_32(x64emu_t *emu, uintptr_t fcn) { iFpuuU_t fn = (iFpuuU_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(uint64_t, R_ESP + 16)); } void iFpuLp_32(x64emu_t *emu, uintptr_t fcn) { iFpuLp_t fn = (iFpuLp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } void iFpupi_32(x64emu_t *emu, uintptr_t fcn) { iFpupi_t fn = (iFpupi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index d2f84b24..c0e74182 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -950,7 +950,6 @@ void iFpipp_32(x64emu_t *emu, uintptr_t fnc); void iFpCCC_32(x64emu_t *emu, uintptr_t fnc); void iFpWWu_32(x64emu_t *emu, uintptr_t fnc); void iEpuiL_32(x64emu_t *emu, uintptr_t fnc); -void iFpuip_32(x64emu_t *emu, uintptr_t fnc); void iFpuuU_32(x64emu_t *emu, uintptr_t fnc); void iFpuLp_32(x64emu_t *emu, uintptr_t fnc); void iFpupi_32(x64emu_t *emu, uintptr_t fnc); |