Skip to content

Commit

Permalink
[WRAPPER] Added some more libc wrappers (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksco committed Jun 8, 2023
1 parent c8f3921 commit 2949e5c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/wrapped/generated/functions_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,7 @@
#() iFpupui
#() iFpupuu
#() iFpupup
#() iFpuppL
#() iFpuppp
#() iFpUiUi
#() iFpUupp
Expand Down
3 changes: 3 additions & 0 deletions src/wrapped/generated/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,7 @@ typedef int32_t (*iFpupiU_t)(void*, uint32_t, void*, int32_t, uint64_t);
typedef int32_t (*iFpupui_t)(void*, uint32_t, void*, uint32_t, int32_t);
typedef int32_t (*iFpupuu_t)(void*, uint32_t, void*, uint32_t, uint32_t);
typedef int32_t (*iFpupup_t)(void*, uint32_t, void*, uint32_t, void*);
typedef int32_t (*iFpuppL_t)(void*, uint32_t, void*, void*, uintptr_t);
typedef int32_t (*iFpuppp_t)(void*, uint32_t, void*, void*, void*);
typedef int32_t (*iFpUiUi_t)(void*, uint64_t, int32_t, uint64_t, int32_t);
typedef int32_t (*iFpUupp_t)(void*, uint64_t, uint32_t, void*, void*);
Expand Down Expand Up @@ -4303,6 +4304,7 @@ void iFpupiU(x64emu_t *emu, uintptr_t fcn) { iFpupiU_t fn = (iFpupiU_t)fcn; R_RA
void iFpupui(x64emu_t *emu, uintptr_t fcn) { iFpupui_t fn = (iFpupui_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (int32_t)R_R8); }
void iFpupuu(x64emu_t *emu, uintptr_t fcn) { iFpupuu_t fn = (iFpupuu_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (uint32_t)R_R8); }
void iFpupup(x64emu_t *emu, uintptr_t fcn) { iFpupup_t fn = (iFpupup_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX, (void*)R_R8); }
void iFpuppL(x64emu_t *emu, uintptr_t fcn) { iFpuppL_t fn = (iFpuppL_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (uintptr_t)R_R8); }
void iFpuppp(x64emu_t *emu, uintptr_t fcn) { iFpuppp_t fn = (iFpuppp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8); }
void iFpUiUi(x64emu_t *emu, uintptr_t fcn) { iFpUiUi_t fn = (iFpUiUi_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (int32_t)R_RDX, (uint64_t)R_RCX, (int32_t)R_R8); }
void iFpUupp(x64emu_t *emu, uintptr_t fcn) { iFpUupp_t fn = (iFpUupp_t)fcn; R_RAX=(int32_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (void*)R_R8); }
Expand Down Expand Up @@ -6883,6 +6885,7 @@ int isSimpleWrapper(wrapper_t fun) {
if (fun == &iFpupui) return 1;
if (fun == &iFpupuu) return 1;
if (fun == &iFpupup) return 1;
if (fun == &iFpuppL) return 1;
if (fun == &iFpuppp) return 1;
if (fun == &iFpUiUi) return 1;
if (fun == &iFpUupp) return 1;
Expand Down
1 change: 1 addition & 0 deletions src/wrapped/generated/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,7 @@ void iFpupiU(x64emu_t *emu, uintptr_t fnc);
void iFpupui(x64emu_t *emu, uintptr_t fnc);
void iFpupuu(x64emu_t *emu, uintptr_t fnc);
void iFpupup(x64emu_t *emu, uintptr_t fnc);
void iFpuppL(x64emu_t *emu, uintptr_t fnc);
void iFpuppp(x64emu_t *emu, uintptr_t fnc);
void iFpUiUi(x64emu_t *emu, uintptr_t fnc);
void iFpUupp(x64emu_t *emu, uintptr_t fnc);
Expand Down
6 changes: 3 additions & 3 deletions src/wrapped/wrappedlibc_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ DATA(opterr, sizeof(int))
DATA(optind, sizeof(int))
DATA(optopt, sizeof(int))
GO(__overflow, iFpi)
//GO(parse_printf_format,
GO(parse_printf_format, LFpLp)
//GO(passwd2des, // Deprecated
GO(pathconf, lFpi)
GOW(pause, iFv)
Expand Down Expand Up @@ -1362,7 +1362,7 @@ GOW(posix_spawn_file_actions_destroy, iFp)
GOW(posix_spawn_file_actions_init, iFp)
GOM(posix_spawnp, iFEpppppp)
GO(ppoll, iFpLpp)
//GO(__ppoll_chk,
GO(__ppoll_chk, iFpuppL)
GOWM(prctl, iFEiLLLL)
GO(pread, IFipUI)
GOW(__pread64, lFipLI)
Expand Down Expand Up @@ -1693,7 +1693,7 @@ GO(siggetmask, iFv)
GO(sighold, iFi)
GO(sigignore, iFi)
GO(siginterrupt, iFii)
//GO(sigisemptyset, iF!)
GO(sigisemptyset, iFp)
//GO(__sigismember,
GO(sigismember, iFpi)
GOM(siglongjmp, vFEpi)
Expand Down

0 comments on commit 2949e5c

Please sign in to comment.