diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-07-09 11:58:35 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-07-09 11:58:35 +0200 |
| commit | ec3786f86295b0fb769970bcb3c77b4ffffd7d48 (patch) | |
| tree | eeda9ecd7394e93eac2f759786ac3f7c19a1334b /src/wrapped/generated | |
| parent | 0e761801deb4aa045e6052dee454973587e8dd4b (diff) | |
| download | box64-ec3786f86295b0fb769970bcb3c77b4ffffd7d48.tar.gz box64-ec3786f86295b0fb769970bcb3c77b4ffffd7d48.zip | |
Various improvement and some workaround to support musl binary (for #324)
Diffstat (limited to 'src/wrapped/generated')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 12 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedcurltypes.h | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibctypes.h | 5 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibpthreadtypes.h | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 7 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 3 |
6 files changed, 31 insertions, 0 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 69be082b..465b9e10 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -685,6 +685,7 @@ #() iFEpip #() iFEpiV #() iFEpiA +#() iFEpup #() iFEpUp #() iFEpLi #() iFEpLp @@ -815,6 +816,7 @@ #() uFEppp #() uFifff #() uFuuuu +#() uFpiip #() uFpipu #() uFpipp #() uFpCCC @@ -852,6 +854,7 @@ #() lFppii #() lFppip #() lFpppL +#() LFEppL #() LFEppp #() LFippL #() LFippp @@ -2138,6 +2141,8 @@ wrappedcrypto: - PEM_write_bio_ECPrivateKey - PEM_write_bio_RSAPrivateKey wrappedcurl: +- iFpup: + - curl_multi_setopt - uFpup: - curl_easy_setopt wrappeddbus: @@ -2679,6 +2684,7 @@ wrappedlibc: - iopl - iFp: - _setjmp + - atexit - getcontext - setcontext - setjmp @@ -2713,6 +2719,7 @@ wrappedlibc: - iFpi: - __sigsetjmp - backtrace + - sigsetjmp - iFpL: - munmap - iFpp: @@ -2813,6 +2820,9 @@ wrappedlibc: - __wprintf_chk - lFppL: - readlink +- LFppL: + - strlcat + - strlcpy - pFpip: - fts_open - pFppp: @@ -3058,12 +3068,14 @@ wrappedlibpthread: - pthread_barrierattr_init - pthread_condattr_destroy - pthread_condattr_init + - pthread_getattr_default_np - pthread_mutex_destroy - pthread_mutex_lock - pthread_mutex_trylock - pthread_mutex_unlock - pthread_mutexattr_destroy - pthread_mutexattr_init + - pthread_setattr_default_np - vFpi: - _pthread_cleanup_pop - _pthread_cleanup_pop_restore diff --git a/src/wrapped/generated/wrappedcurltypes.h b/src/wrapped/generated/wrappedcurltypes.h index e5f8c9cd..4542b673 100644 --- a/src/wrapped/generated/wrappedcurltypes.h +++ b/src/wrapped/generated/wrappedcurltypes.h @@ -11,9 +11,11 @@ #define ADDED_FUNCTIONS() #endif +typedef int64_t (*iFpup_t)(void*, uint64_t, void*); typedef uint64_t (*uFpup_t)(void*, uint64_t, void*); #define SUPER() ADDED_FUNCTIONS() \ + GO(curl_multi_setopt, iFpup_t) \ GO(curl_easy_setopt, uFpup_t) #endif // __wrappedcurlTYPES_H_ diff --git a/src/wrapped/generated/wrappedlibctypes.h b/src/wrapped/generated/wrappedlibctypes.h index 2e911b45..989cdf64 100644 --- a/src/wrapped/generated/wrappedlibctypes.h +++ b/src/wrapped/generated/wrappedlibctypes.h @@ -50,6 +50,7 @@ typedef int64_t (*iFppA_t)(void*, void*, va_list); typedef int64_t (*iFpOu_t)(void*, int32_t, uint64_t); typedef intptr_t (*lFipV_t)(int64_t, void*, ...); typedef intptr_t (*lFppL_t)(void*, void*, uintptr_t); +typedef uintptr_t (*LFppL_t)(void*, void*, uintptr_t); typedef void* (*pFpip_t)(void*, int64_t, void*); typedef void* (*pFppp_t)(void*, void*, void*); typedef void (*vFiipV_t)(int64_t, int64_t, void*, ...); @@ -93,6 +94,7 @@ typedef int64_t (*iFppipppp_t)(void*, void*, int64_t, void*, void*, void*, void* GO(vfork, iFv_t) \ GO(iopl, iFi_t) \ GO(_setjmp, iFp_t) \ + GO(atexit, iFp_t) \ GO(getcontext, iFp_t) \ GO(setcontext, iFp_t) \ GO(setjmp, iFp_t) \ @@ -117,6 +119,7 @@ typedef int64_t (*iFppipppp_t)(void*, void*, int64_t, void*, void*, void*, void* GO(fstat64, iFip_t) \ GO(__sigsetjmp, iFpi_t) \ GO(backtrace, iFpi_t) \ + GO(sigsetjmp, iFpi_t) \ GO(munmap, iFpL_t) \ GO(__vprintf_chk, iFpp_t) \ GO(dl_iterate_phdr, iFpp_t) \ @@ -193,6 +196,8 @@ typedef int64_t (*iFppipppp_t)(void*, void*, int64_t, void*, void*, void*, void* GO(open64, iFpOu_t) \ GO(__wprintf_chk, lFipV_t) \ GO(readlink, lFppL_t) \ + GO(strlcat, LFppL_t) \ + GO(strlcpy, LFppL_t) \ GO(fts_open, pFpip_t) \ GO(tsearch, pFppp_t) \ GO(__syslog_chk, vFiipV_t) \ diff --git a/src/wrapped/generated/wrappedlibpthreadtypes.h b/src/wrapped/generated/wrappedlibpthreadtypes.h index c22ae27b..ae6e10a3 100644 --- a/src/wrapped/generated/wrappedlibpthreadtypes.h +++ b/src/wrapped/generated/wrappedlibpthreadtypes.h @@ -42,12 +42,14 @@ typedef int64_t (*iFpppp_t)(void*, void*, void*, void*); GO(pthread_barrierattr_init, iFp_t) \ GO(pthread_condattr_destroy, iFp_t) \ GO(pthread_condattr_init, iFp_t) \ + GO(pthread_getattr_default_np, iFp_t) \ GO(pthread_mutex_destroy, iFp_t) \ GO(pthread_mutex_lock, iFp_t) \ GO(pthread_mutex_trylock, iFp_t) \ GO(pthread_mutex_unlock, iFp_t) \ GO(pthread_mutexattr_destroy, iFp_t) \ GO(pthread_mutexattr_init, iFp_t) \ + GO(pthread_setattr_default_np, iFp_t) \ GO(_pthread_cleanup_pop, vFpi_t) \ GO(_pthread_cleanup_pop_restore, vFpi_t) \ GO(pthread_getattr_np, iFLp_t) \ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 2a214391..f9606533 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -719,6 +719,7 @@ typedef int64_t (*iFEpii_t)(x64emu_t*, void*, int64_t, int64_t); typedef int64_t (*iFEpip_t)(x64emu_t*, void*, int64_t, void*); typedef int64_t (*iFEpiV_t)(x64emu_t*, void*, int64_t, void*); typedef int64_t (*iFEpiA_t)(x64emu_t*, void*, int64_t, void*); +typedef int64_t (*iFEpup_t)(x64emu_t*, void*, uint64_t, void*); typedef int64_t (*iFEpUp_t)(x64emu_t*, void*, uint64_t, void*); typedef int64_t (*iFEpLi_t)(x64emu_t*, void*, uintptr_t, int64_t); typedef int64_t (*iFEpLp_t)(x64emu_t*, void*, uintptr_t, void*); @@ -849,6 +850,7 @@ typedef uint64_t (*uFEpup_t)(x64emu_t*, void*, uint64_t, void*); typedef uint64_t (*uFEppp_t)(x64emu_t*, void*, void*, void*); typedef uint64_t (*uFifff_t)(int64_t, float, float, float); typedef uint64_t (*uFuuuu_t)(uint64_t, uint64_t, uint64_t, uint64_t); +typedef uint64_t (*uFpiip_t)(void*, int64_t, int64_t, void*); typedef uint64_t (*uFpipu_t)(void*, int64_t, void*, uint64_t); typedef uint64_t (*uFpipp_t)(void*, int64_t, void*, void*); typedef uint64_t (*uFpCCC_t)(void*, uint8_t, uint8_t, uint8_t); @@ -886,6 +888,7 @@ typedef intptr_t (*lFpilp_t)(void*, int64_t, intptr_t, void*); typedef intptr_t (*lFppii_t)(void*, void*, int64_t, int64_t); typedef intptr_t (*lFppip_t)(void*, void*, int64_t, void*); typedef intptr_t (*lFpppL_t)(void*, void*, void*, uintptr_t); +typedef uintptr_t (*LFEppL_t)(x64emu_t*, void*, void*, uintptr_t); typedef uintptr_t (*LFEppp_t)(x64emu_t*, void*, void*, void*); typedef uintptr_t (*LFippL_t)(int64_t, void*, void*, uintptr_t); typedef uintptr_t (*LFippp_t)(int64_t, void*, void*, void*); @@ -2814,6 +2817,7 @@ void iFEpii(x64emu_t *emu, uintptr_t fcn) { iFEpii_t fn = (iFEpii_t)fcn; R_RAX=( void iFEpip(x64emu_t *emu, uintptr_t fcn) { iFEpip_t fn = (iFEpip_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX); } void iFEpiV(x64emu_t *emu, uintptr_t fcn) { iFEpiV_t fn = (iFEpiV_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)(R_RSP + 8)); } void iFEpiA(x64emu_t *emu, uintptr_t fcn) { iFEpiA_t fn = (iFEpiA_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX); } +void iFEpup(x64emu_t *emu, uintptr_t fcn) { iFEpup_t fn = (iFEpup_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX); } void iFEpUp(x64emu_t *emu, uintptr_t fcn) { iFEpUp_t fn = (iFEpUp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX); } void iFEpLi(x64emu_t *emu, uintptr_t fcn) { iFEpLi_t fn = (iFEpLi_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (int64_t)R_RDX); } void iFEpLp(x64emu_t *emu, uintptr_t fcn) { iFEpLp_t fn = (iFEpLp_t)fcn; R_RAX=(int64_t)fn(emu, (void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX); } @@ -2944,6 +2948,7 @@ void uFEpup(x64emu_t *emu, uintptr_t fcn) { uFEpup_t fn = (uFEpup_t)fcn; R_RAX=( void uFEppp(x64emu_t *emu, uintptr_t fcn) { uFEppp_t fn = (uFEppp_t)fcn; R_RAX=(uint64_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } void uFifff(x64emu_t *emu, uintptr_t fcn) { uFifff_t fn = (uFifff_t)fcn; R_RAX=(uint64_t)fn((int64_t)R_RDI, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0]); } void uFuuuu(x64emu_t *emu, uintptr_t fcn) { uFuuuu_t fn = (uFuuuu_t)fcn; R_RAX=(uint64_t)fn((uint64_t)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX); } +void uFpiip(x64emu_t *emu, uintptr_t fcn) { uFpiip_t fn = (uFpiip_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } void uFpipu(x64emu_t *emu, uintptr_t fcn) { uFpipu_t fn = (uFpipu_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (uint64_t)R_RCX); } void uFpipp(x64emu_t *emu, uintptr_t fcn) { uFpipp_t fn = (uFpipp_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (void*)R_RCX); } void uFpCCC(x64emu_t *emu, uintptr_t fcn) { uFpCCC_t fn = (uFpCCC_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint8_t)R_RDX, (uint8_t)R_RCX); } @@ -2981,6 +2986,7 @@ void lFpilp(x64emu_t *emu, uintptr_t fcn) { lFpilp_t fn = (lFpilp_t)fcn; R_RAX=( void lFppii(x64emu_t *emu, uintptr_t fcn) { lFppii_t fn = (lFppii_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } void lFppip(x64emu_t *emu, uintptr_t fcn) { lFppip_t fn = (lFppip_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } void lFpppL(x64emu_t *emu, uintptr_t fcn) { lFpppL_t fn = (lFpppL_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); } +void LFEppL(x64emu_t *emu, uintptr_t fcn) { LFEppL_t fn = (LFEppL_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void LFEppp(x64emu_t *emu, uintptr_t fcn) { LFEppp_t fn = (LFEppp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } void LFippL(x64emu_t *emu, uintptr_t fcn) { LFippL_t fn = (LFippL_t)fcn; R_RAX=(uintptr_t)fn((int64_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); } void LFippp(x64emu_t *emu, uintptr_t fcn) { LFippp_t fn = (LFippp_t)fcn; R_RAX=(uintptr_t)fn((int64_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } @@ -4928,6 +4934,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &IFpppp) return 1; if (fun == &uFifff) return 4; if (fun == &uFuuuu) return 1; + if (fun == &uFpiip) return 1; if (fun == &uFpipu) return 1; if (fun == &uFpipp) return 1; if (fun == &uFpCCC) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 756eb081..f4aca073 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -718,6 +718,7 @@ void iFEpii(x64emu_t *emu, uintptr_t fnc); void iFEpip(x64emu_t *emu, uintptr_t fnc); void iFEpiV(x64emu_t *emu, uintptr_t fnc); void iFEpiA(x64emu_t *emu, uintptr_t fnc); +void iFEpup(x64emu_t *emu, uintptr_t fnc); void iFEpUp(x64emu_t *emu, uintptr_t fnc); void iFEpLi(x64emu_t *emu, uintptr_t fnc); void iFEpLp(x64emu_t *emu, uintptr_t fnc); @@ -848,6 +849,7 @@ void uFEpup(x64emu_t *emu, uintptr_t fnc); void uFEppp(x64emu_t *emu, uintptr_t fnc); void uFifff(x64emu_t *emu, uintptr_t fnc); void uFuuuu(x64emu_t *emu, uintptr_t fnc); +void uFpiip(x64emu_t *emu, uintptr_t fnc); void uFpipu(x64emu_t *emu, uintptr_t fnc); void uFpipp(x64emu_t *emu, uintptr_t fnc); void uFpCCC(x64emu_t *emu, uintptr_t fnc); @@ -885,6 +887,7 @@ void lFpilp(x64emu_t *emu, uintptr_t fnc); void lFppii(x64emu_t *emu, uintptr_t fnc); void lFppip(x64emu_t *emu, uintptr_t fnc); void lFpppL(x64emu_t *emu, uintptr_t fnc); +void LFEppL(x64emu_t *emu, uintptr_t fnc); void LFEppp(x64emu_t *emu, uintptr_t fnc); void LFippL(x64emu_t *emu, uintptr_t fnc); void LFippp(x64emu_t *emu, uintptr_t fnc); |