diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-06 14:09:13 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-06 14:09:13 +0100 |
| commit | 079cb9e8337e43d4984597f595ff027de3819131 (patch) | |
| tree | a6f43a0da0e9a2ddbd2548e838c6cada0aaf1cdc /src | |
| parent | d21dedbe4f7afbc8f05fb1af1ac37370e8a88b75 (diff) | |
| download | box64-079cb9e8337e43d4984597f595ff027de3819131.tar.gz box64-079cb9e8337e43d4984597f595ff027de3819131.zip | |
Added strcmp wrapped function
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 1 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 1 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 60 |
4 files changed, 64 insertions, 0 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 282a30b5..e5cf9d17 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -30,6 +30,7 @@ #() iFLL #() iFLp #() iFpi +#() iFpp #() uFpp #() fFif #() fFfi diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 836303b6..a6ce1ee7 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -101,6 +101,7 @@ typedef int32_t (*iFup_t)(uint32_t, void*); typedef int32_t (*iFLL_t)(uintptr_t, uintptr_t); typedef int32_t (*iFLp_t)(uintptr_t, void*); typedef int32_t (*iFpi_t)(void*, int32_t); +typedef int32_t (*iFpp_t)(void*, void*); typedef uint32_t (*uFpp_t)(void*, void*); typedef float (*fFif_t)(int32_t, float); typedef float (*fFfi_t)(float, int32_t); @@ -183,6 +184,7 @@ void iFup(x64emu_t *emu, uintptr_t fcn) { iFup_t fn = (iFup_t)fcn; R_RAX=fn((uin void iFLL(x64emu_t *emu, uintptr_t fcn) { iFLL_t fn = (iFLL_t)fcn; R_RAX=fn((uintptr_t)R_RDI, (uintptr_t)R_RSI); } void iFLp(x64emu_t *emu, uintptr_t fcn) { iFLp_t fn = (iFLp_t)fcn; R_RAX=fn((uintptr_t)R_RDI, (void*)R_RSI); } void iFpi(x64emu_t *emu, uintptr_t fcn) { iFpi_t fn = (iFpi_t)fcn; R_RAX=fn((void*)R_RDI, (int32_t)R_RSI); } +void iFpp(x64emu_t *emu, uintptr_t fcn) { iFpp_t fn = (iFpp_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI); } void uFpp(x64emu_t *emu, uintptr_t fcn) { uFpp_t fn = (uFpp_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (void*)R_RSI); } void fFif(x64emu_t *emu, uintptr_t fcn) { fFif_t fn = (fFif_t)fcn; emu->xmm[0].f[0]=fn((int32_t)R_RDI, emu->xmm[0].f[0]); } void fFfi(x64emu_t *emu, uintptr_t fcn) { fFfi_t fn = (fFfi_t)fcn; emu->xmm[0].f[0]=fn(emu->xmm[0].f[0], (int32_t)R_RDI); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 9f6e0e5a..acac04a4 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -62,6 +62,7 @@ void iFup(x64emu_t *emu, uintptr_t fnc); void iFLL(x64emu_t *emu, uintptr_t fnc); void iFLp(x64emu_t *emu, uintptr_t fnc); void iFpi(x64emu_t *emu, uintptr_t fnc); +void iFpp(x64emu_t *emu, uintptr_t fnc); void uFpp(x64emu_t *emu, uintptr_t fnc); void fFif(x64emu_t *emu, uintptr_t fnc); void fFfi(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index c7b431f0..e8987aea 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1724,6 +1724,7 @@ DATA(stdout, 8) //GO(__strcasestr, //GOW(strcasestr, //GO(__strcat_chk, +GO(strcmp, iFpp) //GO(strcoll, //GO(__strcoll_l, //GOW(strcoll_l, @@ -2240,3 +2241,62 @@ GOM(_ITM_deregisterTMCloneTable, vFEp) GOM(__register_frame_info, vFpp) // faked function GOM(__deregister_frame_info, pFp) + +//GOI(bcmp, +//GOI(__gettimeofday, +//GOI(gettimeofday, +//GOI(index, +//GOI(memchr, +//GOI(memcmp, +//GOI(memcpy, +//GOI(__memcpy_chk, +//GOI(memmove, +//GOI(__memmove_chk, +//GOI(__mempcpy, +//GOI(mempcpy, +//GOI(__mempcpy_chk, +//GOI(memrchr, +//GOI(memset, +//GOI(__memset_chk, +//GOI(__rawmemchr, +//GOI(rawmemchr, +//GOI(rindex, +//GOI(__sched_cpucount, +//GOI(__stpcpy, +//GOI(stpcpy, +//GOI(__stpncpy, +//GOI(stpncpy, +//GOI(__strcasecmp, +//GOI(strcasecmp, +//GOI(__strcasecmp_l, +//GOI(strcasecmp_l, +//GOI(strcat, +//GOI(strchr, +//GOI(strchrnul, +//GOI(strcmp, +//GOI(strcpy, +//GOI(strcspn, +//GOI(strlen, +//GOI(strncasecmp, +//GOI(__strncasecmp_l, +//GOI(strncasecmp_l, +//GOI(strncat, +//GOI(strncmp, +//GOI(strncpy, +//GOI(strnlen, +//GOI(strpbrk, +//GOI(strrchr, +//GOI(strspn, +//GOI(strstr, +//GOI(time, +//GOI(wcschr, +//GOI(wcscmp, +//GOI(wcscpy, +//GOI(wcslen, +//GOI(wcsncmp, +//GOI(wcsnlen, +//GOI(wcsrchr, +//GOI(wmemchr, +//GOI(wmemcmp, +//GOI(wmemset, +//GOI(__wmemset_chk, \ No newline at end of file |