From a4cd4c0745beae84b46aa81080891fb4441aedf8 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 5 Jul 2021 08:47:20 +0200 Subject: Added a couple of libc wrapped symbol (for #21) --- src/wrapped/generated/functions_list.txt | 1 + src/wrapped/generated/wrapper.c | 3 +++ src/wrapped/generated/wrapper.h | 1 + src/wrapped/wrappedlibc_private.h | 4 ++-- 4 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 6b73ab75..0f10cdd8 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -578,6 +578,7 @@ #() lFEpip #() lFEppL #() lFiipL +#() lFilpp #() lFipiI #() lFipLi #() lFipLI diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index c82362ef..86e9e88b 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -612,6 +612,7 @@ typedef double (*dFppiL_t)(void*, void*, int64_t, uintptr_t); typedef intptr_t (*lFEpip_t)(x64emu_t*, void*, int64_t, void*); typedef intptr_t (*lFEppL_t)(x64emu_t*, void*, void*, uintptr_t); typedef intptr_t (*lFiipL_t)(int64_t, int64_t, void*, uintptr_t); +typedef intptr_t (*lFilpp_t)(int64_t, intptr_t, void*, void*); typedef intptr_t (*lFipiI_t)(int64_t, void*, int64_t, int64_t); typedef intptr_t (*lFipLi_t)(int64_t, void*, uintptr_t, int64_t); typedef intptr_t (*lFipLI_t)(int64_t, void*, uintptr_t, int64_t); @@ -1943,6 +1944,7 @@ void dFppiL(x64emu_t *emu, uintptr_t fcn) { dFppiL_t fn = (dFppiL_t)fcn; emu->xm void lFEpip(x64emu_t *emu, uintptr_t fcn) { lFEpip_t fn = (lFEpip_t)fcn; R_RAX=(intptr_t)fn(emu, (void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX); } void lFEppL(x64emu_t *emu, uintptr_t fcn) { lFEppL_t fn = (lFEppL_t)fcn; R_RAX=(intptr_t)fn(emu, (void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void lFiipL(x64emu_t *emu, uintptr_t fcn) { lFiipL_t fn = (lFiipL_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (int64_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); } +void lFilpp(x64emu_t *emu, uintptr_t fcn) { lFilpp_t fn = (lFilpp_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (intptr_t)R_RSI, (void*)R_RDX, (void*)R_RCX); } void lFipiI(x64emu_t *emu, uintptr_t fcn) { lFipiI_t fn = (lFipiI_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX); } void lFipLi(x64emu_t *emu, uintptr_t fcn) { lFipLi_t fn = (lFipLi_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (int64_t)R_RCX); } void lFipLI(x64emu_t *emu, uintptr_t fcn) { lFipLI_t fn = (lFipLI_t)fcn; R_RAX=(intptr_t)fn((int64_t)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX, (int64_t)R_RCX); } @@ -3199,6 +3201,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &UFpipp) return 1; if (fun == &dFppiL) return -1; if (fun == &lFiipL) return 1; + if (fun == &lFilpp) return 1; if (fun == &lFipiI) return 1; if (fun == &lFipLi) return 1; if (fun == &lFipLI) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index e3f0e948..d009d2b9 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -608,6 +608,7 @@ void dFppiL(x64emu_t *emu, uintptr_t fnc); void lFEpip(x64emu_t *emu, uintptr_t fnc); void lFEppL(x64emu_t *emu, uintptr_t fnc); void lFiipL(x64emu_t *emu, uintptr_t fnc); +void lFilpp(x64emu_t *emu, uintptr_t fnc); void lFipiI(x64emu_t *emu, uintptr_t fnc); void lFipLi(x64emu_t *emu, uintptr_t fnc); void lFipLI(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index 4ca839ac..db5ec03b 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -172,7 +172,7 @@ GO(ctime_r, pFpp) //DATA(__ctype32_b, //DATA(__ctype32_tolower, //DATA(__ctype32_toupper, -//DATA(__ctype_b, +DATA(__ctype_b, sizeof(void*)) GO(__ctype_b_loc, pFv) GOW(__ctype_get_mb_cur_max, LFv) //GO(__ctype_init, @@ -1411,7 +1411,7 @@ DATA(__progname_full, sizeof(void)) //GO(pthread_setcancelstate, //GO(pthread_setcanceltype, //GO(pthread_setschedparam, -//GO(ptrace, +GO(ptrace, lFilpp) //GO(ptsname, //GOW(ptsname_r, //GO(__ptsname_r_chk, -- cgit 1.4.1