From e8264eb0dbbda0c7179652214b5ac308454c2586 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 25 Mar 2021 15:19:18 +0100 Subject: A bit more libc wrapped function --- src/wrapped/generated/functions_list.txt | 1 + src/wrapped/generated/wrapper.c | 2 ++ src/wrapped/generated/wrapper.h | 1 + src/wrapped/wrappedlibc_private.h | 4 ++-- 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 6f50f01b..9c86247f 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -136,6 +136,7 @@ #() dFdi #() dFdd #() dFdp +#() dFLL #() dFpi #() dFpp #() lFpi diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 333ba69a..257037ce 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -169,6 +169,7 @@ typedef double (*dFid_t)(int32_t, double); typedef double (*dFdi_t)(double, int32_t); typedef double (*dFdd_t)(double, double); typedef double (*dFdp_t)(double, void*); +typedef double (*dFLL_t)(uintptr_t, uintptr_t); typedef double (*dFpi_t)(void*, int32_t); typedef double (*dFpp_t)(void*, void*); typedef intptr_t (*lFpi_t)(void*, int32_t); @@ -1196,6 +1197,7 @@ void dFid(x64emu_t *emu, uintptr_t fcn) { dFid_t fn = (dFid_t)fcn; emu->xmm[0].d void dFdi(x64emu_t *emu, uintptr_t fcn) { dFdi_t fn = (dFdi_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], (int32_t)R_RDI); } void dFdd(x64emu_t *emu, uintptr_t fcn) { dFdd_t fn = (dFdd_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], emu->xmm[1].d[0]); } void dFdp(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], (void*)R_RDI); } +void dFLL(x64emu_t *emu, uintptr_t fcn) { dFLL_t fn = (dFLL_t)fcn; emu->xmm[0].d[0]=fn((uintptr_t)R_RDI, (uintptr_t)R_RSI); } void dFpi(x64emu_t *emu, uintptr_t fcn) { dFpi_t fn = (dFpi_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (int32_t)R_RSI); } void dFpp(x64emu_t *emu, uintptr_t fcn) { dFpp_t fn = (dFpp_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI); } void lFpi(x64emu_t *emu, uintptr_t fcn) { lFpi_t fn = (lFpi_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (int32_t)R_RSI); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 3a788013..1ed68d5e 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -166,6 +166,7 @@ void dFid(x64emu_t *emu, uintptr_t fnc); void dFdi(x64emu_t *emu, uintptr_t fnc); void dFdd(x64emu_t *emu, uintptr_t fnc); void dFdp(x64emu_t *emu, uintptr_t fnc); +void dFLL(x64emu_t *emu, uintptr_t fnc); void dFpi(x64emu_t *emu, uintptr_t fnc); void dFpp(x64emu_t *emu, uintptr_t fnc); void lFpi(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index fe6389ec..55e4948c 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -193,7 +193,7 @@ GOM(__cxa_finalize, vFEp) //GO(des_setparity, //GO(__dgettext, //GOW(dgettext, -//GO(difftime, +GO(difftime, dFLL) //GO(dirfd, //GO(dirname, //GO(div, @@ -327,7 +327,7 @@ GO(fflush_unlocked, iFp) //GO(ffs, //GOW(ffsl, //GO(ffsll, -//GOW(fgetc, +GOW(fgetc, iFp) //GOW(fgetc_unlocked, //GO(fgetgrent, //GOW(fgetgrent_r, -- cgit 1.4.1