diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 11:42:45 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 11:42:45 +0100 |
| commit | d92b46426cc7eff9620386d8044ae7eb80b8f9e8 (patch) | |
| tree | 3abb32ce0ba9ea906e70c0309498e88e1632f812 /src | |
| parent | 1c34edb857c0b5a32ab0721ca6041a7f6428a85b (diff) | |
| download | box64-d92b46426cc7eff9620386d8044ae7eb80b8f9e8.tar.gz box64-d92b46426cc7eff9620386d8044ae7eb80b8f9e8.zip | |
Added some more libc wrapped functions
Diffstat (limited to 'src')
| -rwxr-xr-x | src/libtools/signals.c | 2 | ||||
| -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 | 18 |
5 files changed, 14 insertions, 10 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index fe30adf3..9e7aacb8 100755 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -119,7 +119,7 @@ struct x64_fpstate typedef struct x64_fpstate *x64_fpregset_t; -typedef struct +typedef struct x64_stack_s { void *ss_sp; int ss_flags; diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 9992fec5..5fe8263c 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -88,6 +88,7 @@ #() iFii #() iFiI #() iFiu +#() iFiU #() iFip #() iFIi #() iFui diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 92d4d435..03614a81 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -121,6 +121,7 @@ typedef int32_t (*iFEp_t)(x64emu_t*, void*); typedef int32_t (*iFii_t)(int32_t, int32_t); typedef int32_t (*iFiI_t)(int32_t, int64_t); typedef int32_t (*iFiu_t)(int32_t, uint32_t); +typedef int32_t (*iFiU_t)(int32_t, uint64_t); typedef int32_t (*iFip_t)(int32_t, void*); typedef int32_t (*iFIi_t)(int64_t, int32_t); typedef int32_t (*iFui_t)(uint32_t, int32_t); @@ -1181,6 +1182,7 @@ void iFEp(x64emu_t *emu, uintptr_t fcn) { iFEp_t fn = (iFEp_t)fcn; R_RAX=fn(emu, void iFii(x64emu_t *emu, uintptr_t fcn) { iFii_t fn = (iFii_t)fcn; R_RAX=fn((int32_t)R_RDI, (int32_t)R_RSI); } void iFiI(x64emu_t *emu, uintptr_t fcn) { iFiI_t fn = (iFiI_t)fcn; R_RAX=fn((int32_t)R_RDI, (int64_t)R_RSI); } void iFiu(x64emu_t *emu, uintptr_t fcn) { iFiu_t fn = (iFiu_t)fcn; R_RAX=fn((int32_t)R_RDI, (uint32_t)R_RSI); } +void iFiU(x64emu_t *emu, uintptr_t fcn) { iFiU_t fn = (iFiU_t)fcn; R_RAX=fn((int32_t)R_RDI, (uint64_t)R_RSI); } void iFip(x64emu_t *emu, uintptr_t fcn) { iFip_t fn = (iFip_t)fcn; R_RAX=fn((int32_t)R_RDI, (void*)R_RSI); } void iFIi(x64emu_t *emu, uintptr_t fcn) { iFIi_t fn = (iFIi_t)fcn; R_RAX=fn((int64_t)R_RDI, (int32_t)R_RSI); } void iFui(x64emu_t *emu, uintptr_t fcn) { iFui_t fn = (iFui_t)fcn; R_RAX=fn((uint32_t)R_RDI, (int32_t)R_RSI); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index 766f98a0..ac61bf20 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -118,6 +118,7 @@ void iFEp(x64emu_t *emu, uintptr_t fnc); void iFii(x64emu_t *emu, uintptr_t fnc); void iFiI(x64emu_t *emu, uintptr_t fnc); void iFiu(x64emu_t *emu, uintptr_t fnc); +void iFiU(x64emu_t *emu, uintptr_t fnc); void iFip(x64emu_t *emu, uintptr_t fnc); void iFIi(x64emu_t *emu, uintptr_t fnc); void iFui(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index 9e8f9a8e..3254a86d 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -275,9 +275,9 @@ GO(__errno_location, pFv) //GO(ether_ntoa_r, //GO(ether_ntohost, //GOW(euidaccess, -//GO(eventfd, -//GO(eventfd_read, -//GO(eventfd_write, +GO(eventfd, iFui) +GO(eventfd_read, iFip) +GO(eventfd_write, iFiU) //GO(execl, //GO(execle, GOM(execlp, iFEpV) @@ -496,8 +496,8 @@ GOW(geteuid, pFv) //GO(getfsent, //GO(getfsfile, //GO(getfsspec, -//GOW(getgid, -//GO(getgrent, +GOW(getgid, iFv) +GO(getgrent, pFv) //GO(getgrent_r, //GO(getgrgid, //GO(getgrgid_r, @@ -615,7 +615,7 @@ GO(__gettimeofday, iFpp) GO(gettimeofday, iFpp) //GOW(getttyent, //GOW(getttynam, -//GOW(getuid, +GOW(getuid, uFv) //GO(getusershell, //GOW(getutent, //GOW(getutent_r, @@ -1663,7 +1663,7 @@ GOW(setvbuf, iFppiL) //GO(shmctl, //GO(shmdt, //GO(shmget, -//GOW(shutdown, +GOW(shutdown, iFii) GOM(__sigaction, iFEipp) // Weak GOM(sigaction, iFEipp) // Weak GO(__sigaddset, iFpi) @@ -1714,7 +1714,7 @@ GOM(__snprintf_chk, iFEpLiLpV) //Weak //GO(sockatmark, GO(__socket, iFiii) GOW(socket, iFiii) -//GOW(socketpair, +GOW(socketpair, iFiiip) //GO(splice, GOM(sprintf, iFEppV) GOM(__sprintf_chk, iFEpilpV) @@ -1732,7 +1732,7 @@ GOM(__stack_chk_fail, vFE) //GOW(statfs, GOW(statfs64, iFpp) //GOW(statvfs, -//GOW(statvfs64, +GOW(statvfs64, iFpp) //GO(statx, DATA(stderr, sizeof(void*)) DATA(stdin, sizeof(void*)) |