diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-07-10 08:07:44 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-07-10 08:07:44 +0200 |
| commit | 9a17d9a35e6e0b1daffb551e72381e98d96995e5 (patch) | |
| tree | 605d866d0feb150ee53b1eecf5b6b4eb26c6faba /src | |
| parent | a2ca22972c71eaac9c38bbae2709954b1e311d8d (diff) | |
| download | box64-9a17d9a35e6e0b1daffb551e72381e98d96995e5.tar.gz box64-9a17d9a35e6e0b1daffb551e72381e98d96995e5.zip | |
Added memmem wrapped function (for #33)
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 1 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 3 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 1 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 2 |
4 files changed, 6 insertions, 1 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 3da53c9e..970c6a35 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -661,6 +661,7 @@ #() pFpupi #() pFplpp #() pFpLip +#() pFpLpL #() pFppii #() pFppiL #() pFppip diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 05c05c47..ab6b09ef 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -695,6 +695,7 @@ typedef void* (*pFpuup_t)(void*, uint64_t, uint64_t, void*); typedef void* (*pFpupi_t)(void*, uint64_t, void*, int64_t); typedef void* (*pFplpp_t)(void*, intptr_t, void*, void*); typedef void* (*pFpLip_t)(void*, uintptr_t, int64_t, void*); +typedef void* (*pFpLpL_t)(void*, uintptr_t, void*, uintptr_t); typedef void* (*pFppii_t)(void*, void*, int64_t, int64_t); typedef void* (*pFppiL_t)(void*, void*, int64_t, uintptr_t); typedef void* (*pFppip_t)(void*, void*, int64_t, void*); @@ -2096,6 +2097,7 @@ void pFpuup(x64emu_t *emu, uintptr_t fcn) { pFpuup_t fn = (pFpuup_t)fcn; R_RAX=( void pFpupi(x64emu_t *emu, uintptr_t fcn) { pFpupi_t fn = (pFpupi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, (void*)R_RDX, (int64_t)R_RCX); } void pFplpp(x64emu_t *emu, uintptr_t fcn) { pFplpp_t fn = (pFplpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX); } void pFpLip(x64emu_t *emu, uintptr_t fcn) { pFpLip_t fn = (pFpLip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } +void pFpLpL(x64emu_t *emu, uintptr_t fcn) { pFpLpL_t fn = (pFpLpL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); } void pFppii(x64emu_t *emu, uintptr_t fcn) { pFppii_t fn = (pFppii_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } void pFppiL(x64emu_t *emu, uintptr_t fcn) { pFppiL_t fn = (pFppiL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (uintptr_t)R_RCX); } void pFppip(x64emu_t *emu, uintptr_t fcn) { pFppip_t fn = (pFppip_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (void*)R_RCX); } @@ -3416,6 +3418,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &pFpupi) return 1; if (fun == &pFplpp) return 1; if (fun == &pFpLip) return 1; + if (fun == &pFpLpL) return 1; if (fun == &pFppii) return 1; if (fun == &pFppiL) return 1; if (fun == &pFppip) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 4c303515..e8466e81 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -691,6 +691,7 @@ void pFpuup(x64emu_t *emu, uintptr_t fnc); void pFpupi(x64emu_t *emu, uintptr_t fnc); void pFplpp(x64emu_t *emu, uintptr_t fnc); void pFpLip(x64emu_t *emu, uintptr_t fnc); +void pFpLpL(x64emu_t *emu, uintptr_t fnc); void pFppii(x64emu_t *emu, uintptr_t fnc); void pFppiL(x64emu_t *emu, uintptr_t fnc); void pFppip(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index f8b74713..351581fc 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1142,7 +1142,7 @@ GO(memcpy, pFppL) GO(__memcpy_chk, pFppuL) //GO(memfd_create, //GO(memfrob, -//GOW(memmem, +GOW(memmem, pFpLpL) GO(memmove, pFppL) GO(__memmove_chk, pFppLL) //GOI(__mempcpy, |