diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64emu_private.h | 1 | ||||
| -rw-r--r-- | src/include/box32.h | 2 | ||||
| -rwxr-xr-x | src/include/myalign32.h | 31 | ||||
| -rw-r--r-- | src/libtools/libc_net32.c | 173 | ||||
| -rwxr-xr-x | src/libtools/myalign32.c | 83 | ||||
| -rw-r--r-- | src/tools/callback.c | 2 | ||||
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 59 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibctypes32.h | 22 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibpthreadtypes32.h | 3 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 69 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 34 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc.c | 341 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc_private.h | 149 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibm_private.h | 4 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibpthread_private.h | 2 |
15 files changed, 651 insertions, 324 deletions
diff --git a/src/emu/x64emu_private.h b/src/emu/x64emu_private.h index 903f2c0c..31303f71 100644 --- a/src/emu/x64emu_private.h +++ b/src/emu/x64emu_private.h @@ -135,6 +135,7 @@ typedef struct x64emu_s { int type; // EMUTYPE_xxx define #ifdef BOX32 int libc_err; // copy of errno from libc + int libc_herr; // copy of h_errno from libc unsigned short libctype[384]; // copy from __ctype_b address might be too high const unsigned short** ref_ctype; const unsigned short* ctype; diff --git a/src/include/box32.h b/src/include/box32.h index 9d5a40ca..9d14b0f7 100644 --- a/src/include/box32.h +++ b/src/include/box32.h @@ -58,7 +58,7 @@ static inline long_t to_long(long l) { } static inline ulong_t to_ulong(unsigned long l) { if(l!=0xffffffffffffffffLL && (l>>32)) - printf_log(LOG_NONE, "Warning, long 0x%p is not a 32bits value\n", (void*)l); + printf_log(LOG_NONE, "Warning, ulong 0x%p is not a 32bits value\n", (void*)l); return (ulong_t)l; } #else //TEST32 diff --git a/src/include/myalign32.h b/src/include/myalign32.h index c60cf30a..e1104ad0 100755 --- a/src/include/myalign32.h +++ b/src/include/myalign32.h @@ -95,10 +95,10 @@ void AlignVorbisDspState(void* dest, void* source); // x86 -> Arm void UnalignVorbisBlock(void* dest, void* source); // Arm -> x86 void AlignVorbisBlock(void* dest, void* source); // x86 -> Arm - -void UnalignEpollEvent(void* dest, void* source, int nbr); // Arm -> x86 -void AlignEpollEvent(void* dest, void* source, int nbr); // x86 -> Arm - +#endif +void UnalignEpollEvent32(void* dest, void* source, int nbr); // Arm -> x86 +void AlignEpollEvent32(void* dest, void* source, int nbr); // x86 -> Arm +#if 0 void UnalignSmpegInfo(void* dest, void* source); // Arm -> x86 void AlignSmpegInfo(void* dest, void* source); // x86 -> Arm #endif @@ -478,4 +478,27 @@ struct i386_hostent { ptr_t h_addr_list;// char ** } __attribute__((packed)); +struct i386_iovec +{ + ptr_t iov_base; // void * + uint32_t iov_len; +}; + +struct i386_msghdr +{ + ptr_t msg_name; // void * + uint32_t msg_namelen; + ptr_t msg_iov; // struct i386_iovec * + uint32_t msg_iovlen; + ptr_t msg_control; // void * + ulong_t msg_controllen; + int msg_flags; +}; +void AlignIOV_32(void* dest, void* source); // x86 -> Native +void UnalignIOV_32(void* dest, void* source); // Native -> x86 + +void AlignMsgHdr_32(void* dest, void* dest_iov, void* source); // x86 -> Native +//void UnalignMsgHdr_32(void* dest, void* source, void* source_iov); // Native -> x86 + + #endif//__MY_ALIGN32__H_ \ No newline at end of file diff --git a/src/libtools/libc_net32.c b/src/libtools/libc_net32.c new file mode 100644 index 00000000..bfcc606b --- /dev/null +++ b/src/libtools/libc_net32.c @@ -0,0 +1,173 @@ +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <stdlib.h> +#include <stdio.h> +#include <stddef.h> +#include <string.h> +#include <wchar.h> +#include <dlfcn.h> +#include <signal.h> +#include <errno.h> +#include <err.h> +#include <sys/types.h> +#include <sys/select.h> +#include <unistd.h> +#include <sys/socket.h> +#include <sys/utsname.h> +#include <getopt.h> +#include <pwd.h> +#include <sys/resource.h> +#include <sys/socket.h> +#include <netdb.h> +#include <ifaddrs.h> +#include <net/if.h> + +#include "box64stack.h" +#include "x64emu.h" +#include "debug.h" +#include "wrapper32.h" +#include "bridge.h" +#include "callback.h" +#include "librarian.h" +#include "emu/x64emu_private.h" +#include "box32context.h" +#include "myalign32.h" +#include "fileutils.h" +#include "globalsymbols.h" +#include "box32.h" +#include "converter32.h" + +EXPORT ssize_t my32_recvmsg(x64emu_t* emu, int socket, void* msg, int flags) +{ + struct iovec iov; + struct msghdr m; + AlignMsgHdr_32(&m, &iov, msg); + ssize_t ret = recvmsg(socket, &m, flags); + // put back msg_flags in place + ((struct i386_msghdr*)msg)->msg_flags = m.msg_flags; + return ret; +} + +EXPORT ssize_t my32_sendmsg(x64emu_t* emu, int socket, void* msg, int flags) +{ + struct iovec iov[256]; + struct msghdr m; + AlignMsgHdr_32(&m, &iov, msg); + ssize_t ret = sendmsg(socket, &m, flags); + return ret; +} + +EXPORT int my32_getaddrinfo(x64emu_t* emu, void* node, void* service, struct i386_addrinfo* hints, ptr_t* res) +{ + struct addrinfo* hints_ = (struct addrinfo*)hints; // only first part is used, wich is identical + struct addrinfo* p = {0}; + int ret = getaddrinfo(node, service, hints_, &p); + if(!ret && p) { + // counting the number of "next" + struct addrinfo* p2 = p; + int idx = 0; + while(p2) {++idx; p2 = p2->ai_next;} + // doing the malloc! + void* r = box_malloc(idx*sizeof(struct i386_addrinfo)+sizeof(void*)); + ptr_t p3 = to_ptrv(r); + *res = p3; + p2 = p; + for(int i=0; i<idx; ++i) { + struct i386_addrinfo* dest = (struct i386_addrinfo*)from_ptrv(p3); + p3+=sizeof(struct i386_addrinfo); + if(!i) { + *(void**)from_ptrv(p3) = p; + p3+=sizeof(void*); + } + dest->ai_flags = p2->ai_flags; + dest->ai_family = p2->ai_family; + dest->ai_socktype = p2->ai_socktype; + dest->ai_protocol = p2->ai_protocol; + dest->ai_addrlen = p2->ai_addrlen; + dest->ai_addr = to_ptrv(p2->ai_addr); + dest->ai_canonname = to_cstring(p2->ai_canonname); + p2 = p2->ai_next; + dest->ai_next = p2?p3:0; + } + } else + *res = 0; + return ret; +} + +EXPORT void my32_freeaddrinfo(x64emu_t* emu, void* a) { + if(!a) return; + void* orig = *(void**)(a+sizeof(struct i386_addrinfo)); + freeaddrinfo(orig); + box_free(a); +} + +EXPORT void* my32_gethostbyname(x64emu_t* emu, const char* a) +{ + static struct i386_hostent ret = {0}; + static ptr_t strings[128] = {0}; + struct hostent* h = gethostbyname(a); + if(!h) return NULL; + // convert... + ret.h_name = to_cstring(h->h_name); + ret.h_addrtype = h->h_addrtype; + ret.h_length = h->h_length; + ptr_t s = to_ptrv(&strings); + int idx = 0; + ret.h_aliases = h->h_aliases?s:0; + if(h->h_aliases) { + char* p = *h->h_aliases; + while(p) { + strings[idx++] = to_cstring(p++); + } + strings[idx++] = 0; + } + ret.h_addr_list = h->h_addr_list?to_ptrv(&strings[idx]):0; + if(h->h_addr_list) { + void* p = *h->h_addr_list; + while(p) + strings[idx++] = to_ptrv(p++); + strings[idx++] = 0; + } + // done + return &ret; +} + +struct i386_ifaddrs +{ + ptr_t ifa_next; // struct ifaddrs * + ptr_t ifa_name; // char * + uint32_t ifa_flags; + ptr_t ifa_addr; // struct sockaddr * + ptr_t ifa_netmask;// struct sockaddr * + ptr_t ifa_ifu; // union of struct sockaddr + ptr_t ifa_data; // void * +}; + +EXPORT int my32_getifaddrs(x64emu_t* emu, void** res) +{ + struct ifaddrs* addrs; + int ret = getifaddrs(&addrs); + if(!ret) { + // convert the chained list of ifaddrs to i386 (narrowed) in place + struct ifaddrs* p = addrs; + while(p) { + struct i386_ifaddrs *i386 = (struct i386_ifaddrs*)p; + struct ifaddrs* next = p->ifa_next; + i386->ifa_next = to_ptrv(p->ifa_next); + i386->ifa_name = to_cstring(p->ifa_name); + i386->ifa_flags = p->ifa_flags; + i386->ifa_addr = to_ptrv(p->ifa_addr); + i386->ifa_netmask = to_ptrv(p->ifa_netmask); + i386->ifa_ifu = (i386->ifa_flags&IFF_BROADCAST)?to_ptrv(p->ifa_broadaddr):to_ptrv(p->ifa_dstaddr); + i386->ifa_data = to_ptrv(p->ifa_data); + p = next; + } + } +} + +EXPORT void* my32___h_errno_location(x64emu_t* emu) +{ + // TODO: Find a better way to do this + // cannot use __thread as it makes the address not 32bits + emu->libc_herr = h_errno; + return &emu->libc_herr; +} diff --git a/src/libtools/myalign32.c b/src/libtools/myalign32.c index 0dd2e94e..47aa3ff3 100755 --- a/src/libtools/myalign32.c +++ b/src/libtools/myalign32.c @@ -5,6 +5,7 @@ #include <wchar.h> #include <sys/epoll.h> #include <fts.h> +#include <sys/socket.h> #include "x64emu.h" #include "emu/x64emu_private.h" @@ -974,46 +975,46 @@ void AlignVorbisBlock(void* dest, void* source) } #undef TRANSFERT - -typedef union __attribute__((packed)) x64_epoll_data { - void *ptr; +#endif +typedef union __attribute__((packed)) i386_epoll_data { + ptr_t ptr; //void* int fd; uint32_t u32; uint64_t u64; -} x64_epoll_data_t; +} i386_epoll_data_t; -struct __attribute__((packed)) x64_epoll_event { +struct __attribute__((packed)) i386_epoll_event { uint32_t events; - x64_epoll_data_t data; + i386_epoll_data_t data; }; -// Arm -> x64 -void UnalignEpollEvent(void* dest, void* source, int nbr) +// Arm -> i386 +void UnalignEpollEvent32(void* dest, void* source, int nbr) { - struct x64_epoll_event *x64_struct = (struct x64_epoll_event*)dest; + struct i386_epoll_event *i386_struct = (struct i386_epoll_event*)dest; struct epoll_event *arm_struct = (struct epoll_event*)source; while(nbr) { - x64_struct->events = arm_struct->events; - x64_struct->data.u64 = arm_struct->data.u64; - ++x64_struct; + i386_struct->events = arm_struct->events; + i386_struct->data.u64 = arm_struct->data.u64; + ++i386_struct; ++arm_struct; --nbr; } } -// x64 -> Arm -void AlignEpollEvent(void* dest, void* source, int nbr) +// i386 -> Arm +void AlignEpollEvent32(void* dest, void* source, int nbr) { - struct x64_epoll_event *x64_struct = (struct x64_epoll_event*)source; + struct i386_epoll_event *i386_struct = (struct i386_epoll_event*)source; struct epoll_event *arm_struct = (struct epoll_event*)dest; while(nbr) { - arm_struct->events = x64_struct->events; - arm_struct->data.u64 = x64_struct->data.u64; - ++x64_struct; + arm_struct->events = i386_struct->events; + arm_struct->data.u64 = i386_struct->data.u64; + ++i386_struct; ++arm_struct; --nbr; } } - +#if 0 typedef struct __attribute__((packed)) x64_SMPEG_Info_s { int has_audio; int has_video; @@ -1130,5 +1131,47 @@ void unalignNGValue(void* value, my_GValue_t* v, int n) --n; } } +#endif + +// x86 -> Native +void AlignIOV_32(void* dest, void* source) +{ + struct iovec* d = dest; + struct i386_iovec* s = source; + + d->iov_base = from_ptrv(s->iov_base); + d->iov_len = s->iov_len; +} + +// Native -> x86 +void UnalignIOV_32(void* dest, void* source) +{ + struct iovec* s = source; + struct i386_iovec* d = dest; + + d->iov_base = to_ptrv(s->iov_base); + d->iov_len = s->iov_len; +} + + +// x86 -> Native +void AlignMsgHdr_32(void* dest, void* dest_iov, void* source) +{ + struct iovec* iov = dest_iov; + struct msghdr* d = dest; + struct i386_msghdr* s = source; + struct i386_iovec* s_iov = from_ptrv(s->msg_iov); + + d->msg_name = from_ptrv(s->msg_name); + d->msg_namelen = s->msg_namelen; + d->msg_iov = iov; + // TODO: check if iovlen is too big + for(int i=0; i<s->msg_iovlen; ++i) { + AlignIOV_32(d->msg_iov+i, s_iov+i); + } + d->msg_iovlen = s->msg_iovlen; + d->msg_control = from_ptrv(s->msg_control); + d->msg_controllen = s->msg_controllen; + d->msg_flags = s->msg_flags; +} -#endif \ No newline at end of file diff --git a/src/tools/callback.c b/src/tools/callback.c index 661a3b13..e0df5cfc 100644 --- a/src/tools/callback.c +++ b/src/tools/callback.c @@ -236,7 +236,7 @@ uint64_t RunFunctionFmt(uintptr_t fnc, const char* fmt, ...) if(box64_is32bits) { R_RSP = R_EBP; // mov esp, ebp R_RBP = Pop_32(emu); // pop ebp - } + } else #endif { R_RSP = R_RBP; // mov rsp, rbp diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index f511cd8b..579519ca 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -58,6 +58,7 @@ #() iFip -> iFip #() iFih -> iFih #() iFia -> iFia +#() iFui -> iFui #() iFuu -> iFuu #() iFup -> iFup #() iFli -> iFli @@ -66,6 +67,7 @@ #() iFpL -> iFpL #() iFpp -> iFpp #() iFph -> iFph +#() iFpV -> iFpV #() iFhp -> iFhp #() iFhh -> iFhh #() IFII -> IFII @@ -88,14 +90,17 @@ #() LFpL -> LFpL #() LFpp -> LFpp #() pFEv -> pFEv +#() pFEu -> pFEu #() pFEp -> pFEp #() pFia -> pFia #() pFLL -> pFLL #() pFpi -> pFpi #() pFpL -> pFpL #() pFpp -> pFpp +#() hFpp -> hFpp #() tFip -> tFip #() tFpL -> tFpL +#() iFEbp_ -> iFEB #() iFHBp_ -> iFHB #() fFpBp_ -> fFpB #() dFpBp_ -> dFpB @@ -116,6 +121,7 @@ #() iFEpL -> iFEpL #() iFEpp -> iFEpp #() iFEpV -> iFEpV +#() iFEhi -> iFEhi #() iFEhp -> iFEhp #() iFiii -> iFiii #() iFiiI -> iFiiI @@ -154,13 +160,14 @@ #() fFppa -> fFppa #() dFddd -> dFddd #() dFddp -> dFddp -#() dFppa -> dFppa #() lFipL -> lFipL #() lFlpi -> lFlpi #() LFpip -> LFpip #() pFEip -> pFEip #() pFEpi -> pFEpi #() pFEpp -> pFEpp +#() pFipi -> pFipi +#() pFpii -> pFpii #() pFpiL -> pFpiL #() pFpih -> pFpih #() pFpuL -> pFpuL @@ -173,14 +180,19 @@ #() iFpBp_i -> iFpBi #() IFpBp_i -> IFpBi #() UFpBp_i -> UFpBi +#() dFpBp_i -> dFpBi +#() dFpBp_a -> dFpBa #() lFpBp_i -> lFpBi #() LFpBp_i -> LFpBi +#() pFppriiiiiiiiilt_ -> pFppB #() vFEipV -> vFEipV #() vFEpup -> vFEpup #() vFEppp -> vFEppp +#() vFppip -> vFppip #() iFEiip -> iFEiip #() iFEiiN -> iFEiiN #() iFEipp -> iFEipp +#() iFEipV -> iFEipV #() iFELup -> iFELup #() iFEpip -> iFEpip #() iFEpup -> iFEpup @@ -190,13 +202,17 @@ #() iFEppV -> iFEppV #() iFEpOu -> iFEpOu #() iFEhpV -> iFEhpV +#() iFiiip -> iFiiip #() iFiiiN -> iFiiiN -#() iFiiII -> iFiiII +#() iFiill -> iFiill #() iFiuui -> iFiuui #() iFipii -> iFipii #() iFipup -> iFipup +#() iFippi -> iFippi #() iFuupi -> iFuupi #() iFhpiL -> iFhpiL +#() lFEipi -> lFEipi +#() lFiipL -> lFiipL #() lFipLi -> lFipLi #() LFpLLh -> LFpLLh #() LFppLp -> LFppLp @@ -205,29 +221,41 @@ #() pFEppp -> pFEppp #() pFpiLL -> pFpiLL #() pFppLL -> pFppLL +#() IFpBp_ii -> IFpBii +#() UFpBp_ii -> UFpBii +#() lFiibp_L -> lFiiBL #() LFpbp_Lp -> LFpBLp #() iFEpprLL_ -> iFEppB #() LFpLpriiiiiiiiilt_ -> LFpLpB #() vFEpLLp -> vFEpLLp +#() iFEiiip -> iFEiiip +#() iFEipii -> iFEipii #() iFEpupV -> iFEpupV #() iFEpLpV -> iFEpLpV #() iFEppiV -> iFEppiV #() iFEpppi -> iFEpppi #() iFEpppp -> iFEpppp #() iFiiipu -> iFiiipu +#() iFiiipp -> iFiiipp #() iFiLLLL -> iFiLLLL +#() iFipLLi -> iFipLLi #() iFpppup -> iFpppup +#() uFpLLLh -> uFpLLLh #() LFpLppa -> LFpLppa #() iFEBh_ppp -> iFEBppp #() LFpbp_LLp -> LFpBLLp #() LFpBp_LLp -> LFpBLLp +#() iFippprLL_ -> iFipppB #() LFLbp_bL_Bp_BL_ -> LFLBBBB #() LFpLpriiiiiiiiilt_a -> LFpLpBa #() iFEpippp -> iFEpippp #() iFEpuppp -> iFEpuppp #() iFEpLppp -> iFEpLppp +#() lFipLipu -> lFipLipu +#() lFipLipp -> lFipLipp #() pFEpLLiN -> pFEpLLiN #() iFEpLiipV -> iFEpLiipV +#() iFpupLpLi -> iFpupLpLi #() pFEpLiiii -> pFEpLiiii #() pFEpLiiiI -> pFEpLiiiI #() iFEpippppp -> iFEpippppp @@ -243,6 +271,8 @@ #() iFEvpV -> iFEpV #() UFsvvs -> UFss #() pFEppv -> pFEpp +#() LFpBp_iv -> LFpBp_i +#() iFEivpV -> iFEipV #() iFEpvpp -> iFEppp #() iFEhvpV -> iFEhpV #() iFEpvvpV -> iFEppV @@ -262,6 +292,7 @@ wrappedlibc: - __close_nocancel - iFL: - iFp: + - getifaddrs - iFh: - getwc - iFO: @@ -275,14 +306,20 @@ wrappedlibc: - __ctype_tolower_loc - __ctype_toupper_loc - __errno_location + - __h_errno_location - localeconv +- pFu: + - getpwuid - pFL: - pFp: - gethostbyname + - gmtime + - localtime - vFip: - vFpi: - vFpu: - iFip: + - futimes - getrlimit - setrlimit - iFpi: @@ -290,9 +327,12 @@ wrappedlibc: - iFpL: - iFpp: - alphasort64 + - execvp - statvfs - utimes - iFpV: + - execl + - execlp - iFhp: - statvfs64 - IFII: @@ -318,18 +358,27 @@ wrappedlibc: - iFppp: - vswscanf - iFppV: + - fscanf - swscanf - iFpOu: - KFppa: - __strtold_l - strtold_l +- lFipi: + - recvmsg + - sendmsg - lFipL: +- lFppi: +- LFppi: +- pFpii: - pFppv: - __realpath_chk - vFpLLp: - vFpppp: - __libc_init -- iFiiII: +- iFivpV: +- iFiiip: +- iFipii: - iFLLLL: - iFpvpp: - iFpupV: @@ -338,6 +387,7 @@ wrappedlibc: - iFpppp: - getaddrinfo - iFhvpV: +- LFppiv: - iFpvvpV: - iFpippp: - iFpuppp: @@ -481,7 +531,6 @@ wrappedlibpthread: - pthread_attr_setinheritsched - pthread_attr_setschedpolicy - pthread_attr_setscope - - pthread_kill - pthread_mutexattr_setkind_np - iFpL: - pthread_attr_setguardsize @@ -510,6 +559,8 @@ wrappedlibpthread: - pthread_mutex_timedlock - pthread_once - pthread_rwlock_init +- iFhi: + - pthread_kill - vFppp: - _pthread_cleanup_push - _pthread_cleanup_push_defer diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h index 02226b11..0e84d953 100644 --- a/src/wrapped32/generated/wrappedlibctypes32.h +++ b/src/wrapped32/generated/wrappedlibctypes32.h @@ -25,6 +25,7 @@ typedef uint32_t (*uFV_t)(...); typedef uint64_t (*UFp_t)(void*); typedef uintptr_t (*LFL_t)(uintptr_t); typedef void* (*pFv_t)(void); +typedef void* (*pFu_t)(uint32_t); typedef void* (*pFL_t)(uintptr_t); typedef void* (*pFp_t)(void*); typedef void (*vFip_t)(int32_t, void*); @@ -55,11 +56,17 @@ typedef int32_t (*iFppp_t)(void*, void*, void*); typedef int32_t (*iFppV_t)(void*, void*, ...); typedef int32_t (*iFpOu_t)(void*, int32_t, uint32_t); typedef double (*KFppa_t)(void*, void*, void*); +typedef intptr_t (*lFipi_t)(int32_t, void*, int32_t); typedef intptr_t (*lFipL_t)(int32_t, void*, uintptr_t); +typedef intptr_t (*lFppi_t)(void*, void*, int32_t); +typedef uintptr_t (*LFppi_t)(void*, void*, int32_t); +typedef void* (*pFpii_t)(void*, int32_t, int32_t); typedef void* (*pFppv_t)(void*, void*, void); typedef void (*vFpLLp_t)(void*, uintptr_t, uintptr_t, void*); typedef void (*vFpppp_t)(void*, void*, void*, void*); -typedef int32_t (*iFiiII_t)(int32_t, int32_t, int64_t, int64_t); +typedef int32_t (*iFivpV_t)(int32_t, void, void*, ...); +typedef int32_t (*iFiiip_t)(int32_t, int32_t, int32_t, void*); +typedef int32_t (*iFipii_t)(int32_t, void*, int32_t, int32_t); typedef int32_t (*iFLLLL_t)(uintptr_t, uintptr_t, uintptr_t, uintptr_t); typedef int32_t (*iFpvpp_t)(void*, void, void*, void*); typedef int32_t (*iFpupV_t)(void*, uint32_t, void*, ...); @@ -67,6 +74,7 @@ typedef int32_t (*iFpLpV_t)(void*, uintptr_t, void*, ...); typedef int32_t (*iFppiV_t)(void*, void*, int32_t, ...); typedef int32_t (*iFpppp_t)(void*, void*, void*, void*); typedef int32_t (*iFhvpV_t)(uintptr_t, void, void*, ...); +typedef uintptr_t (*LFppiv_t)(void*, void*, int32_t, void); typedef int32_t (*iFpvvpV_t)(void*, void, void, void*, ...); typedef int32_t (*iFpippp_t)(void*, int32_t, void*, void*, void*); typedef int32_t (*iFpuppp_t)(void*, uint32_t, void*, void*, void*); @@ -81,19 +89,28 @@ typedef int32_t (*iFpuvvppp_t)(void*, uint32_t, void, void, void*, void*, void*) #define SUPER() ADDED_FUNCTIONS() \ GO(freeaddrinfo, vFp_t) \ GO(__close_nocancel, iFi_t) \ + GO(getifaddrs, iFp_t) \ GO(getwc, iFh_t) \ GO(__ctype_b_loc, pFv_t) \ GO(__ctype_tolower_loc, pFv_t) \ GO(__ctype_toupper_loc, pFv_t) \ GO(__errno_location, pFv_t) \ + GO(__h_errno_location, pFv_t) \ GO(localeconv, pFv_t) \ + GO(getpwuid, pFu_t) \ GO(gethostbyname, pFp_t) \ + GO(gmtime, pFp_t) \ + GO(localtime, pFp_t) \ + GO(futimes, iFip_t) \ GO(getrlimit, iFip_t) \ GO(setrlimit, iFip_t) \ GO(backtrace, iFpi_t) \ GO(alphasort64, iFpp_t) \ + GO(execvp, iFpp_t) \ GO(statvfs, iFpp_t) \ GO(utimes, iFpp_t) \ + GO(execl, iFpV_t) \ + GO(execlp, iFpV_t) \ GO(statvfs64, iFhp_t) \ GO(signal, pFip_t) \ GO(backtrace_symbols, pFpi_t) \ @@ -101,9 +118,12 @@ typedef int32_t (*iFpuvvppp_t)(void*, uint32_t, void, void, void*, void*, void*) GO(localtime_r, pFpp_t) \ GO(_ITM_addUserCommitAction, vFpup_t) \ GO(vswscanf, iFppp_t) \ + GO(fscanf, iFppV_t) \ GO(swscanf, iFppV_t) \ GO(__strtold_l, KFppa_t) \ GO(strtold_l, KFppa_t) \ + GO(recvmsg, lFipi_t) \ + GO(sendmsg, lFipi_t) \ GO(__realpath_chk, pFppv_t) \ GO(__libc_init, vFpppp_t) \ GO(getaddrinfo, iFpppp_t) diff --git a/src/wrapped32/generated/wrappedlibpthreadtypes32.h b/src/wrapped32/generated/wrappedlibpthreadtypes32.h index 78f7040d..973dcc55 100644 --- a/src/wrapped32/generated/wrappedlibpthreadtypes32.h +++ b/src/wrapped32/generated/wrappedlibpthreadtypes32.h @@ -19,6 +19,7 @@ typedef void (*vFpi_t)(void*, int32_t); typedef int32_t (*iFpi_t)(void*, int32_t); typedef int32_t (*iFpL_t)(void*, uintptr_t); typedef int32_t (*iFpp_t)(void*, void*); +typedef int32_t (*iFhi_t)(uintptr_t, int32_t); typedef void (*vFppp_t)(void*, void*, void*); typedef int32_t (*iFLup_t)(uintptr_t, uint32_t, void*); typedef int32_t (*iFpup_t)(void*, uint32_t, void*); @@ -60,7 +61,6 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); GO(pthread_attr_setinheritsched, iFpi_t) \ GO(pthread_attr_setschedpolicy, iFpi_t) \ GO(pthread_attr_setscope, iFpi_t) \ - GO(pthread_kill, iFpi_t) \ GO(pthread_mutexattr_setkind_np, iFpi_t) \ GO(pthread_attr_setguardsize, iFpL_t) \ GO(pthread_attr_setstacksize, iFpL_t) \ @@ -87,6 +87,7 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); GO(pthread_mutex_timedlock, iFpp_t) \ GO(pthread_once, iFpp_t) \ GO(pthread_rwlock_init, iFpp_t) \ + GO(pthread_kill, iFhi_t) \ GO(_pthread_cleanup_push, vFppp_t) \ GO(_pthread_cleanup_push_defer, vFppp_t) \ GO(pthread_setaffinity_np, iFLup_t) \ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 8dfe55ff..6451d60a 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -132,6 +132,7 @@ typedef int32_t (*iFiu_t)(int32_t, uint32_t); typedef int32_t (*iFip_t)(int32_t, void*); typedef int32_t (*iFih_t)(int32_t, uintptr_t); typedef int32_t (*iFia_t)(int32_t, void*); +typedef int32_t (*iFui_t)(uint32_t, int32_t); typedef int32_t (*iFuu_t)(uint32_t, uint32_t); typedef int32_t (*iFup_t)(uint32_t, void*); typedef int32_t (*iFli_t)(intptr_t, int32_t); @@ -140,6 +141,7 @@ typedef int32_t (*iFpu_t)(void*, uint32_t); typedef int32_t (*iFpL_t)(void*, uintptr_t); typedef int32_t (*iFpp_t)(void*, void*); typedef int32_t (*iFph_t)(void*, uintptr_t); +typedef int32_t (*iFpV_t)(void*, void*); typedef int32_t (*iFhp_t)(uintptr_t, void*); typedef int32_t (*iFhh_t)(uintptr_t, uintptr_t); typedef int64_t (*IFII_t)(int64_t, int64_t); @@ -162,14 +164,17 @@ typedef double (*dFdp_t)(double, void*); typedef uintptr_t (*LFpL_t)(void*, uintptr_t); typedef uintptr_t (*LFpp_t)(void*, void*); typedef void* (*pFEv_t)(x64emu_t*); +typedef void* (*pFEu_t)(x64emu_t*, uint32_t); typedef void* (*pFEp_t)(x64emu_t*, void*); typedef void* (*pFia_t)(int32_t, void*); typedef void* (*pFLL_t)(uintptr_t, uintptr_t); typedef void* (*pFpi_t)(void*, int32_t); typedef void* (*pFpL_t)(void*, uintptr_t); typedef void* (*pFpp_t)(void*, void*); +typedef uintptr_t (*hFpp_t)(void*, void*); typedef char* (*tFip_t)(int32_t, void*); typedef char* (*tFpL_t)(void*, uintptr_t); +typedef int32_t (*iFEbp__t)(x64emu_t*, struct_p_t*); typedef int32_t (*iFHBp__t)(uintptr_t, struct_p_t*); typedef float (*fFpBp__t)(void*, struct_p_t*); typedef double (*dFpBp__t)(void*, struct_p_t*); @@ -190,6 +195,7 @@ typedef int32_t (*iFEpi_t)(x64emu_t*, void*, int32_t); typedef int32_t (*iFEpL_t)(x64emu_t*, void*, uintptr_t); typedef int32_t (*iFEpp_t)(x64emu_t*, void*, void*); typedef int32_t (*iFEpV_t)(x64emu_t*, void*, void*); +typedef int32_t (*iFEhi_t)(x64emu_t*, uintptr_t, int32_t); typedef int32_t (*iFEhp_t)(x64emu_t*, uintptr_t, void*); typedef int32_t (*iFiii_t)(int32_t, int32_t, int32_t); typedef int32_t (*iFiiI_t)(int32_t, int32_t, int64_t); @@ -228,13 +234,14 @@ typedef float (*fFffp_t)(float, float, void*); typedef float (*fFppa_t)(void*, void*, void*); typedef double (*dFddd_t)(double, double, double); typedef double (*dFddp_t)(double, double, void*); -typedef double (*dFppa_t)(void*, void*, void*); typedef intptr_t (*lFipL_t)(int32_t, void*, uintptr_t); typedef intptr_t (*lFlpi_t)(intptr_t, void*, int32_t); typedef uintptr_t (*LFpip_t)(void*, int32_t, void*); typedef void* (*pFEip_t)(x64emu_t*, int32_t, void*); typedef void* (*pFEpi_t)(x64emu_t*, void*, int32_t); typedef void* (*pFEpp_t)(x64emu_t*, void*, void*); +typedef void* (*pFipi_t)(int32_t, void*, int32_t); +typedef void* (*pFpii_t)(void*, int32_t, int32_t); typedef void* (*pFpiL_t)(void*, int32_t, uintptr_t); typedef void* (*pFpih_t)(void*, int32_t, uintptr_t); typedef void* (*pFpuL_t)(void*, uint32_t, uintptr_t); @@ -247,14 +254,19 @@ typedef char* (*tFipu_t)(int32_t, void*, uint32_t); typedef int32_t (*iFpBp_i_t)(void*, struct_p_t*, int32_t); typedef int64_t (*IFpBp_i_t)(void*, struct_p_t*, int32_t); typedef uint64_t (*UFpBp_i_t)(void*, struct_p_t*, int32_t); +typedef double (*dFpBp_i_t)(void*, struct_p_t*, int32_t); +typedef double (*dFpBp_a_t)(void*, struct_p_t*, void*); typedef intptr_t (*lFpBp_i_t)(void*, struct_p_t*, int32_t); typedef uintptr_t (*LFpBp_i_t)(void*, struct_p_t*, int32_t); +typedef void* (*pFppriiiiiiiiilt__t)(void*, void*, struct_iiiiiiiiilt_t*); typedef void (*vFEipV_t)(x64emu_t*, int32_t, void*, void*); typedef void (*vFEpup_t)(x64emu_t*, void*, uint32_t, void*); typedef void (*vFEppp_t)(x64emu_t*, void*, void*, void*); +typedef void (*vFppip_t)(void*, void*, int32_t, void*); typedef int32_t (*iFEiip_t)(x64emu_t*, int32_t, int32_t, void*); typedef int32_t (*iFEiiN_t)(x64emu_t*, int32_t, int32_t, ...); typedef int32_t (*iFEipp_t)(x64emu_t*, int32_t, void*, void*); +typedef int32_t (*iFEipV_t)(x64emu_t*, int32_t, void*, void*); typedef int32_t (*iFELup_t)(x64emu_t*, uintptr_t, uint32_t, void*); typedef int32_t (*iFEpip_t)(x64emu_t*, void*, int32_t, void*); typedef int32_t (*iFEpup_t)(x64emu_t*, void*, uint32_t, void*); @@ -264,13 +276,17 @@ typedef int32_t (*iFEppp_t)(x64emu_t*, void*, void*, void*); typedef int32_t (*iFEppV_t)(x64emu_t*, void*, void*, void*); typedef int32_t (*iFEpOu_t)(x64emu_t*, void*, int32_t, uint32_t); typedef int32_t (*iFEhpV_t)(x64emu_t*, uintptr_t, void*, void*); +typedef int32_t (*iFiiip_t)(int32_t, int32_t, int32_t, void*); typedef int32_t (*iFiiiN_t)(int32_t, int32_t, int32_t, ...); -typedef int32_t (*iFiiII_t)(int32_t, int32_t, int64_t, int64_t); +typedef int32_t (*iFiill_t)(int32_t, int32_t, intptr_t, intptr_t); typedef int32_t (*iFiuui_t)(int32_t, uint32_t, uint32_t, int32_t); typedef int32_t (*iFipii_t)(int32_t, void*, int32_t, int32_t); typedef int32_t (*iFipup_t)(int32_t, void*, uint32_t, void*); +typedef int32_t (*iFippi_t)(int32_t, void*, void*, int32_t); typedef int32_t (*iFuupi_t)(uint32_t, uint32_t, void*, int32_t); typedef int32_t (*iFhpiL_t)(uintptr_t, void*, int32_t, uintptr_t); +typedef intptr_t (*lFEipi_t)(x64emu_t*, int32_t, void*, int32_t); +typedef intptr_t (*lFiipL_t)(int32_t, int32_t, void*, uintptr_t); typedef intptr_t (*lFipLi_t)(int32_t, void*, uintptr_t, int32_t); typedef uintptr_t (*LFpLLh_t)(void*, uintptr_t, uintptr_t, uintptr_t); typedef uintptr_t (*LFppLp_t)(void*, void*, uintptr_t, void*); @@ -279,29 +295,41 @@ typedef void* (*pFEppi_t)(x64emu_t*, void*, void*, int32_t); typedef void* (*pFEppp_t)(x64emu_t*, void*, void*, void*); typedef void* (*pFpiLL_t)(void*, int32_t, uintptr_t, uintptr_t); typedef void* (*pFppLL_t)(void*, void*, uintptr_t, uintptr_t); +typedef int64_t (*IFpBp_ii_t)(void*, struct_p_t*, int32_t, int32_t); +typedef uint64_t (*UFpBp_ii_t)(void*, struct_p_t*, int32_t, int32_t); +typedef intptr_t (*lFiibp_L_t)(int32_t, int32_t, struct_p_t*, uintptr_t); typedef uintptr_t (*LFpbp_Lp_t)(void*, struct_p_t*, uintptr_t, void*); typedef int32_t (*iFEpprLL__t)(x64emu_t*, void*, void*, struct_LL_t*); typedef uintptr_t (*LFpLpriiiiiiiiilt__t)(void*, uintptr_t, void*, struct_iiiiiiiiilt_t*); typedef void (*vFEpLLp_t)(x64emu_t*, void*, uintptr_t, uintptr_t, void*); +typedef int32_t (*iFEiiip_t)(x64emu_t*, int32_t, int32_t, int32_t, void*); +typedef int32_t (*iFEipii_t)(x64emu_t*, int32_t, void*, int32_t, int32_t); typedef int32_t (*iFEpupV_t)(x64emu_t*, void*, uint32_t, void*, void*); typedef int32_t (*iFEpLpV_t)(x64emu_t*, void*, uintptr_t, void*, void*); typedef int32_t (*iFEppiV_t)(x64emu_t*, void*, void*, int32_t, void*); typedef int32_t (*iFEpppi_t)(x64emu_t*, void*, void*, void*, int32_t); typedef int32_t (*iFEpppp_t)(x64emu_t*, void*, void*, void*, void*); typedef int32_t (*iFiiipu_t)(int32_t, int32_t, int32_t, void*, uint32_t); +typedef int32_t (*iFiiipp_t)(int32_t, int32_t, int32_t, void*, void*); typedef int32_t (*iFiLLLL_t)(int32_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); +typedef int32_t (*iFipLLi_t)(int32_t, void*, uintptr_t, uintptr_t, int32_t); typedef int32_t (*iFpppup_t)(void*, void*, void*, uint32_t, void*); +typedef uint32_t (*uFpLLLh_t)(void*, uintptr_t, uintptr_t, uintptr_t, uintptr_t); typedef uintptr_t (*LFpLppa_t)(void*, uintptr_t, void*, void*, void*); typedef int32_t (*iFEBh_ppp_t)(x64emu_t*, struct_h_t*, void*, void*, void*); typedef uintptr_t (*LFpbp_LLp_t)(void*, struct_p_t*, uintptr_t, uintptr_t, void*); typedef uintptr_t (*LFpBp_LLp_t)(void*, struct_p_t*, uintptr_t, uintptr_t, void*); +typedef int32_t (*iFippprLL__t)(int32_t, void*, void*, void*, struct_LL_t*); typedef uintptr_t (*LFLbp_bL_Bp_BL__t)(uintptr_t, struct_p_t*, struct_L_t*, struct_p_t*, struct_L_t*); typedef uintptr_t (*LFpLpriiiiiiiiilt_a_t)(void*, uintptr_t, void*, struct_iiiiiiiiilt_t*, void*); typedef int32_t (*iFEpippp_t)(x64emu_t*, void*, int32_t, void*, void*, void*); typedef int32_t (*iFEpuppp_t)(x64emu_t*, void*, uint32_t, void*, void*, void*); typedef int32_t (*iFEpLppp_t)(x64emu_t*, void*, uintptr_t, void*, void*, void*); +typedef intptr_t (*lFipLipu_t)(int32_t, void*, uintptr_t, int32_t, void*, uint32_t); +typedef intptr_t (*lFipLipp_t)(int32_t, void*, uintptr_t, int32_t, void*, void*); typedef void* (*pFEpLLiN_t)(x64emu_t*, void*, uintptr_t, uintptr_t, int32_t, ...); typedef int32_t (*iFEpLiipV_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, void*, void*); +typedef int32_t (*iFpupLpLi_t)(void*, uint32_t, void*, uintptr_t, void*, uintptr_t, int32_t); typedef void* (*pFEpLiiii_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, int32_t, int32_t); typedef void* (*pFEpLiiiI_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, int32_t, int64_t); typedef int32_t (*iFEpippppp_t)(x64emu_t*, void*, int32_t, void*, void*, void*, void*, void*); @@ -384,6 +412,7 @@ void iFiu_32(x64emu_t *emu, uintptr_t fcn) { iFiu_t fn = (iFiu_t)fcn; R_EAX = fn void iFip_32(x64emu_t *emu, uintptr_t fcn) { iFip_t fn = (iFip_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8)); } void iFih_32(x64emu_t *emu, uintptr_t fcn) { iFih_t fn = (iFih_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_hash(from_ptri(ptr_t, R_ESP + 8))); } void iFia_32(x64emu_t *emu, uintptr_t fcn) { iFia_t fn = (iFia_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_locale(from_ptri(ptr_t, R_ESP + 8))); } +void iFui_32(x64emu_t *emu, uintptr_t fcn) { iFui_t fn = (iFui_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); } void iFuu_32(x64emu_t *emu, uintptr_t fcn) { iFuu_t fn = (iFuu_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); } void iFup_32(x64emu_t *emu, uintptr_t fcn) { iFup_t fn = (iFup_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptriv(R_ESP + 8)); } void iFli_32(x64emu_t *emu, uintptr_t fcn) { iFli_t fn = (iFli_t)fcn; R_EAX = fn(to_long(from_ptri(long_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); } @@ -392,6 +421,7 @@ void iFpu_32(x64emu_t *emu, uintptr_t fcn) { iFpu_t fn = (iFpu_t)fcn; R_EAX = fn void iFpL_32(x64emu_t *emu, uintptr_t fcn) { iFpL_t fn = (iFpL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8))); } void iFpp_32(x64emu_t *emu, uintptr_t fcn) { iFpp_t fn = (iFpp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); } void iFph_32(x64emu_t *emu, uintptr_t fcn) { iFph_t fn = (iFph_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_hash(from_ptri(ptr_t, R_ESP + 8))); } +void iFpV_32(x64emu_t *emu, uintptr_t fcn) { iFpV_t fn = (iFpV_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptrv(R_ESP + 8)); } void iFhp_32(x64emu_t *emu, uintptr_t fcn) { iFhp_t fn = (iFhp_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8)); } void iFhh_32(x64emu_t *emu, uintptr_t fcn) { iFhh_t fn = (iFhh_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_hash(from_ptri(ptr_t, R_ESP + 8))); } void IFII_32(x64emu_t *emu, uintptr_t fcn) { IFII_t fn = (IFII_t)fcn; ui64_t r; r.i = fn(from_ptri(int64_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; } @@ -414,14 +444,17 @@ void dFdp_32(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; double db void LFpL_32(x64emu_t *emu, uintptr_t fcn) { LFpL_t fn = (LFpL_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)))); } void LFpp_32(x64emu_t *emu, uintptr_t fcn) { LFpp_t fn = (LFpp_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8))); } void pFEv_32(x64emu_t *emu, uintptr_t fcn) { pFEv_t fn = (pFEv_t)fcn; R_EAX = to_ptrv(fn(emu)); } +void pFEu_32(x64emu_t *emu, uintptr_t fcn) { pFEu_t fn = (pFEu_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptri(uint32_t, R_ESP + 4))); } void pFEp_32(x64emu_t *emu, uintptr_t fcn) { pFEp_t fn = (pFEp_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4))); } void pFia_32(x64emu_t *emu, uintptr_t fcn) { pFia_t fn = (pFia_t)fcn; R_EAX = to_ptrv(fn(from_ptri(int32_t, R_ESP + 4), from_locale(from_ptri(ptr_t, R_ESP + 8)))); } void pFLL_32(x64emu_t *emu, uintptr_t fcn) { pFLL_t fn = (pFLL_t)fcn; R_EAX = to_ptrv(fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), to_ulong(from_ptri(ulong_t, R_ESP + 8)))); } void pFpi_32(x64emu_t *emu, uintptr_t fcn) { pFpi_t fn = (pFpi_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); } void pFpL_32(x64emu_t *emu, uintptr_t fcn) { pFpL_t fn = (pFpL_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)))); } void pFpp_32(x64emu_t *emu, uintptr_t fcn) { pFpp_t fn = (pFpp_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8))); } +void hFpp_32(x64emu_t *emu, uintptr_t fcn) { hFpp_t fn = (hFpp_t)fcn; R_EAX = to_hash(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8))); } void tFip_32(x64emu_t *emu, uintptr_t fcn) { tFip_t fn = (tFip_t)fcn; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8))); } void tFpL_32(x64emu_t *emu, uintptr_t fcn) { tFpL_t fn = (tFpL_t)fcn; R_EAX = to_cstring(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)))); } +void iFEbp__32(x64emu_t *emu, uintptr_t fcn) { iFEbp__t fn = (iFEbp__t)fcn; struct_p_t arg_4; from_struct_p(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } void iFHBp__32(x64emu_t *emu, uintptr_t fcn) { iFHBp__t fn = (iFHBp__t)fcn; struct_p_t arg_8; R_EAX = fn(from_hash_d(from_ptri(ptr_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void fFpBp__32(x64emu_t *emu, uintptr_t fcn) { fFpBp__t fn = (fFpBp__t)fcn; struct_p_t arg_8; float fl = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); fpu_do_push(emu); ST0val = fl; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void dFpBp__32(x64emu_t *emu, uintptr_t fcn) { dFpBp__t fn = (dFpBp__t)fcn; struct_p_t arg_8; double db = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); fpu_do_push(emu); ST0val = db; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } @@ -442,6 +475,7 @@ void iFEpi_32(x64emu_t *emu, uintptr_t fcn) { iFEpi_t fn = (iFEpi_t)fcn; R_EAX = void iFEpL_32(x64emu_t *emu, uintptr_t fcn) { iFEpL_t fn = (iFEpL_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8))); } void iFEpp_32(x64emu_t *emu, uintptr_t fcn) { iFEpp_t fn = (iFEpp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)); } void iFEpV_32(x64emu_t *emu, uintptr_t fcn) { iFEpV_t fn = (iFEpV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptrv(R_ESP + 8)); } +void iFEhi_32(x64emu_t *emu, uintptr_t fcn) { iFEhi_t fn = (iFEhi_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptri(int32_t, R_ESP + 8)); } void iFEhp_32(x64emu_t *emu, uintptr_t fcn) { iFEhp_t fn = (iFEhp_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8)); } void iFiii_32(x64emu_t *emu, uintptr_t fcn) { iFiii_t fn = (iFiii_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); } void iFiiI_32(x64emu_t *emu, uintptr_t fcn) { iFiiI_t fn = (iFiiI_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int64_t, R_ESP + 12)); } @@ -480,13 +514,14 @@ void fFffp_32(x64emu_t *emu, uintptr_t fcn) { fFffp_t fn = (fFffp_t)fcn; float f void fFppa_32(x64emu_t *emu, uintptr_t fcn) { fFppa_t fn = (fFppa_t)fcn; float fl = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_locale(from_ptri(ptr_t, R_ESP + 12))); fpu_do_push(emu); ST0val = fl; } void dFddd_32(x64emu_t *emu, uintptr_t fcn) { dFddd_t fn = (dFddd_t)fcn; double db = fn(from_ptri(double, R_ESP + 4), from_ptri(double, R_ESP + 12), from_ptri(double, R_ESP + 20)); fpu_do_push(emu); ST0val = db; } void dFddp_32(x64emu_t *emu, uintptr_t fcn) { dFddp_t fn = (dFddp_t)fcn; double db = fn(from_ptri(double, R_ESP + 4), from_ptri(double, R_ESP + 12), from_ptriv(R_ESP + 20)); fpu_do_push(emu); ST0val = db; } -void dFppa_32(x64emu_t *emu, uintptr_t fcn) { dFppa_t fn = (dFppa_t)fcn; double db = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_locale(from_ptri(ptr_t, R_ESP + 12))); fpu_do_push(emu); ST0val = db; } void lFipL_32(x64emu_t *emu, uintptr_t fcn) { lFipL_t fn = (lFipL_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); } void lFlpi_32(x64emu_t *emu, uintptr_t fcn) { lFlpi_t fn = (lFlpi_t)fcn; R_EAX = to_long(fn(to_long(from_ptri(long_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); } void LFpip_32(x64emu_t *emu, uintptr_t fcn) { LFpip_t fn = (LFpip_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12))); } void pFEip_32(x64emu_t *emu, uintptr_t fcn) { pFEip_t fn = (pFEip_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8))); } void pFEpi_32(x64emu_t *emu, uintptr_t fcn) { pFEpi_t fn = (pFEpi_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8))); } void pFEpp_32(x64emu_t *emu, uintptr_t fcn) { pFEpp_t fn = (pFEpp_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8))); } +void pFipi_32(x64emu_t *emu, uintptr_t fcn) { pFipi_t fn = (pFipi_t)fcn; R_EAX = to_ptrv(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); } +void pFpii_32(x64emu_t *emu, uintptr_t fcn) { pFpii_t fn = (pFpii_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); } void pFpiL_32(x64emu_t *emu, uintptr_t fcn) { pFpiL_t fn = (pFpiL_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); } void pFpih_32(x64emu_t *emu, uintptr_t fcn) { pFpih_t fn = (pFpih_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_hash(from_ptri(ptr_t, R_ESP + 12)))); } void pFpuL_32(x64emu_t *emu, uintptr_t fcn) { pFpuL_t fn = (pFpuL_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)))); } @@ -499,14 +534,19 @@ void tFipu_32(x64emu_t *emu, uintptr_t fcn) { tFipu_t fn = (tFipu_t)fcn; R_EAX = void iFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { iFpBp_i_t fn = (iFpBp_i_t)fcn; struct_p_t arg_8; R_EAX = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void IFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { IFpBp_i_t fn = (IFpBp_i_t)fcn; struct_p_t arg_8; ui64_t r; r.i = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void UFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { UFpBp_i_t fn = (UFpBp_i_t)fcn; struct_p_t arg_8; ui64_t r; r.u = (uint64_t)fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void dFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { dFpBp_i_t fn = (dFpBp_i_t)fcn; struct_p_t arg_8; double db = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); fpu_do_push(emu); ST0val = db; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void dFpBp_a_32(x64emu_t *emu, uintptr_t fcn) { dFpBp_a_t fn = (dFpBp_a_t)fcn; struct_p_t arg_8; double db = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_locale(from_ptri(ptr_t, R_ESP + 12))); fpu_do_push(emu); ST0val = db; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void lFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { lFpBp_i_t fn = (lFpBp_i_t)fcn; struct_p_t arg_8; R_EAX = to_long(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void LFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { LFpBp_i_t fn = (LFpBp_i_t)fcn; struct_p_t arg_8; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void pFppriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fcn) { pFppriiiiiiiiilt__t fn = (pFppriiiiiiiiilt__t)fcn; struct_iiiiiiiiilt_t arg_12; from_struct_iiiiiiiiilt(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); } void vFEipV_32(x64emu_t *emu, uintptr_t fcn) { vFEipV_t fn = (vFEipV_t)fcn; fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); } void vFEpup_32(x64emu_t *emu, uintptr_t fcn) { vFEpup_t fn = (vFEpup_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void vFEppp_32(x64emu_t *emu, uintptr_t fcn) { vFEppp_t fn = (vFEppp_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } +void vFppip_32(x64emu_t *emu, uintptr_t fcn) { vFppip_t fn = (vFppip_t)fcn; fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFEiip_32(x64emu_t *emu, uintptr_t fcn) { iFEiip_t fn = (iFEiip_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEiiN_32(x64emu_t *emu, uintptr_t fcn) { iFEiiN_t fn = (iFEiiN_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEipp_32(x64emu_t *emu, uintptr_t fcn) { iFEipp_t fn = (iFEipp_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } +void iFEipV_32(x64emu_t *emu, uintptr_t fcn) { iFEipV_t fn = (iFEipV_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); } void iFELup_32(x64emu_t *emu, uintptr_t fcn) { iFELup_t fn = (iFELup_t)fcn; R_EAX = fn(emu, to_ulong(from_ptri(ulong_t, R_ESP + 4)), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEpip_32(x64emu_t *emu, uintptr_t fcn) { iFEpip_t fn = (iFEpip_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFEpup_32(x64emu_t *emu, uintptr_t fcn) { iFEpup_t fn = (iFEpup_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } @@ -516,13 +556,17 @@ void iFEppp_32(x64emu_t *emu, uintptr_t fcn) { iFEppp_t fn = (iFEppp_t)fcn; R_EA void iFEppV_32(x64emu_t *emu, uintptr_t fcn) { iFEppV_t fn = (iFEppV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); } void iFEpOu_32(x64emu_t *emu, uintptr_t fcn) { iFEpOu_t fn = (iFEpOu_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), of_convert32(from_ptri(int32_t, R_ESP + 8)), from_ptri(uint32_t, R_ESP + 12)); } void iFEhpV_32(x64emu_t *emu, uintptr_t fcn) { iFEhpV_t fn = (iFEhpV_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); } +void iFiiip_32(x64emu_t *emu, uintptr_t fcn) { iFiiip_t fn = (iFiiip_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFiiiN_32(x64emu_t *emu, uintptr_t fcn) { iFiiiN_t fn = (iFiiiN_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } -void iFiiII_32(x64emu_t *emu, uintptr_t fcn) { iFiiII_t fn = (iFiiII_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int64_t, R_ESP + 12), from_ptri(int64_t, R_ESP + 20)); } +void iFiill_32(x64emu_t *emu, uintptr_t fcn) { iFiill_t fn = (iFiill_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), to_long(from_ptri(long_t, R_ESP + 12)), to_long(from_ptri(long_t, R_ESP + 16))); } void iFiuui_32(x64emu_t *emu, uintptr_t fcn) { iFiuui_t fn = (iFiuui_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFipii_32(x64emu_t *emu, uintptr_t fcn) { iFipii_t fn = (iFipii_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFipup_32(x64emu_t *emu, uintptr_t fcn) { iFipup_t fn = (iFipup_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } +void iFippi_32(x64emu_t *emu, uintptr_t fcn) { iFippi_t fn = (iFippi_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFuupi_32(x64emu_t *emu, uintptr_t fcn) { iFuupi_t fn = (iFuupi_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFhpiL_32(x64emu_t *emu, uintptr_t fcn) { iFhpiL_t fn = (iFhpiL_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), to_ulong(from_ptri(ulong_t, R_ESP + 16))); } +void lFEipi_32(x64emu_t *emu, uintptr_t fcn) { lFEipi_t fn = (lFEipi_t)fcn; R_EAX = to_long(fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); } +void lFiipL_32(x64emu_t *emu, uintptr_t fcn) { lFiipL_t fn = (lFiipL_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), to_ulong(from_ptri(ulong_t, R_ESP + 16)))); } void lFipLi_32(x64emu_t *emu, uintptr_t fcn) { lFipLi_t fn = (lFipLi_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16))); } void LFpLLh_32(x64emu_t *emu, uintptr_t fcn) { LFpLLh_t fn = (LFpLLh_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_hash(from_ptri(ptr_t, R_ESP + 16)))); } void LFppLp_32(x64emu_t *emu, uintptr_t fcn) { LFppLp_t fn = (LFppLp_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16))); } @@ -531,29 +575,41 @@ void pFEppi_32(x64emu_t *emu, uintptr_t fcn) { pFEppi_t fn = (pFEppi_t)fcn; R_EA void pFEppp_32(x64emu_t *emu, uintptr_t fcn) { pFEppp_t fn = (pFEppp_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12))); } void pFpiLL_32(x64emu_t *emu, uintptr_t fcn) { pFpiLL_t fn = (pFpiLL_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)))); } void pFppLL_32(x64emu_t *emu, uintptr_t fcn) { pFppLL_t fn = (pFppLL_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)))); } +void IFpBp_ii_32(x64emu_t *emu, uintptr_t fcn) { IFpBp_ii_t fn = (IFpBp_ii_t)fcn; struct_p_t arg_8; ui64_t r; r.i = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); R_EAX = r.d[0]; R_EDX = r.d[1]; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void UFpBp_ii_32(x64emu_t *emu, uintptr_t fcn) { UFpBp_ii_t fn = (UFpBp_ii_t)fcn; struct_p_t arg_8; ui64_t r; r.u = (uint64_t)fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); R_EAX = r.d[0]; R_EDX = r.d[1]; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void lFiibp_L_32(x64emu_t *emu, uintptr_t fcn) { lFiibp_L_t fn = (lFiibp_L_t)fcn; struct_p_t arg_12; from_struct_p(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 16)))); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); } void LFpbp_Lp_32(x64emu_t *emu, uintptr_t fcn) { LFpbp_Lp_t fn = (LFpbp_Lp_t)fcn; struct_p_t arg_8; from_struct_p(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void iFEpprLL__32(x64emu_t *emu, uintptr_t fcn) { iFEpprLL__t fn = (iFEpprLL__t)fcn; struct_LL_t arg_12; from_struct_LL(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); } void LFpLpriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fcn) { LFpLpriiiiiiiiilt__t fn = (LFpLpriiiiiiiiilt__t)fcn; struct_iiiiiiiiilt_t arg_16; from_struct_iiiiiiiiilt(&arg_16, *(ptr_t*)(from_ptr((R_ESP + 16)))); R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), *(ptr_t*)(from_ptr((R_ESP + 16))) ? &arg_16 : NULL)); } void vFEpLLp_32(x64emu_t *emu, uintptr_t fcn) { vFEpLLp_t fn = (vFEpLLp_t)fcn; fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } +void iFEiiip_32(x64emu_t *emu, uintptr_t fcn) { iFEiiip_t fn = (iFEiiip_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } +void iFEipii_32(x64emu_t *emu, uintptr_t fcn) { iFEipii_t fn = (iFEipii_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFEpupV_32(x64emu_t *emu, uintptr_t fcn) { iFEpupV_t fn = (iFEpupV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEpLpV_32(x64emu_t *emu, uintptr_t fcn) { iFEpLpV_t fn = (iFEpLpV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEppiV_32(x64emu_t *emu, uintptr_t fcn) { iFEppiV_t fn = (iFEppiV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEpppi_32(x64emu_t *emu, uintptr_t fcn) { iFEpppi_t fn = (iFEpppi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFEpppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpppp_t fn = (iFEpppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFiiipu_32(x64emu_t *emu, uintptr_t fcn) { iFiiipu_t fn = (iFiiipu_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16), from_ptri(uint32_t, R_ESP + 20)); } +void iFiiipp_32(x64emu_t *emu, uintptr_t fcn) { iFiiipp_t fn = (iFiiipp_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } void iFiLLLL_32(x64emu_t *emu, uintptr_t fcn) { iFiLLLL_t fn = (iFiLLLL_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), to_ulong(from_ptri(ulong_t, R_ESP + 20))); } +void iFipLLi_32(x64emu_t *emu, uintptr_t fcn) { iFipLLi_t fn = (iFipLLi_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptri(int32_t, R_ESP + 20)); } void iFpppup_32(x64emu_t *emu, uintptr_t fcn) { iFpppup_t fn = (iFpppup_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(uint32_t, R_ESP + 16), from_ptriv(R_ESP + 20)); } +void uFpLLLh_32(x64emu_t *emu, uintptr_t fcn) { uFpLLLh_t fn = (uFpLLLh_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_hash(from_ptri(ptr_t, R_ESP + 20))); } void LFpLppa_32(x64emu_t *emu, uintptr_t fcn) { LFpLppa_t fn = (LFpLppa_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_locale(from_ptri(ptr_t, R_ESP + 20)))); } void iFEBh_ppp_32(x64emu_t *emu, uintptr_t fcn) { iFEBh_ppp_t fn = (iFEBh_ppp_t)fcn; struct_h_t arg_4; R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_h(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } void LFpbp_LLp_32(x64emu_t *emu, uintptr_t fcn) { LFpbp_LLp_t fn = (LFpbp_LLp_t)fcn; struct_p_t arg_8; from_struct_p(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptriv(R_ESP + 20))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void LFpBp_LLp_32(x64emu_t *emu, uintptr_t fcn) { LFpBp_LLp_t fn = (LFpBp_LLp_t)fcn; struct_p_t arg_8; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptriv(R_ESP + 20))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void iFippprLL__32(x64emu_t *emu, uintptr_t fcn) { iFippprLL__t fn = (iFippprLL__t)fcn; struct_LL_t arg_20; from_struct_LL(&arg_20, *(ptr_t*)(from_ptr((R_ESP + 20)))); R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), *(ptr_t*)(from_ptr((R_ESP + 20))) ? &arg_20 : NULL); } void LFLbp_bL_Bp_BL__32(x64emu_t *emu, uintptr_t fcn) { LFLbp_bL_Bp_BL__t fn = (LFLbp_bL_Bp_BL__t)fcn; struct_p_t arg_8; from_struct_p(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); struct_L_t arg_12; from_struct_L(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); struct_p_t arg_16; struct_L_t arg_20; R_EAX = to_ulong(fn(to_ulong(from_ptri(ulong_t, R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL, *(ptr_t*)(from_ptr((R_ESP + 16))) ? &arg_16 : NULL, *(ptr_t*)(from_ptr((R_ESP + 20))) ? &arg_20 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); if (*(ptr_t*)(from_ptr((R_ESP + 16)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 16))), &arg_16); if (*(ptr_t*)(from_ptr((R_ESP + 20)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 20))), &arg_20); } void LFpLpriiiiiiiiilt_a_32(x64emu_t *emu, uintptr_t fcn) { LFpLpriiiiiiiiilt_a_t fn = (LFpLpriiiiiiiiilt_a_t)fcn; struct_iiiiiiiiilt_t arg_16; from_struct_iiiiiiiiilt(&arg_16, *(ptr_t*)(from_ptr((R_ESP + 16)))); R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), *(ptr_t*)(from_ptr((R_ESP + 16))) ? &arg_16 : NULL, from_locale(from_ptri(ptr_t, R_ESP + 20)))); } void iFEpippp_32(x64emu_t *emu, uintptr_t fcn) { iFEpippp_t fn = (iFEpippp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } void iFEpuppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpuppp_t fn = (iFEpuppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } void iFEpLppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpLppp_t fn = (iFEpLppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } +void lFipLipu_32(x64emu_t *emu, uintptr_t fcn) { lFipLipu_t fn = (lFipLipu_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20), from_ptri(uint32_t, R_ESP + 24))); } +void lFipLipp_32(x64emu_t *emu, uintptr_t fcn) { lFipLipp_t fn = (lFipLipp_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24))); } void pFEpLLiN_32(x64emu_t *emu, uintptr_t fcn) { pFEpLLiN_t fn = (pFEpLLiN_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20))); } void iFEpLiipV_32(x64emu_t *emu, uintptr_t fcn) { iFEpLiipV_t fn = (iFEpLiipV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20), from_ptrv(R_ESP + 24)); } +void iFpupLpLi_32(x64emu_t *emu, uintptr_t fcn) { iFpupLpLi_t fn = (iFpupLpLi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), to_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptriv(R_ESP + 20), to_ulong(from_ptri(ulong_t, R_ESP + 24)), from_ptri(int32_t, R_ESP + 28)); } void pFEpLiiii_32(x64emu_t *emu, uintptr_t fcn) { pFEpLiiii_t fn = (pFEpLiiii_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(int32_t, R_ESP + 24))); } void pFEpLiiiI_32(x64emu_t *emu, uintptr_t fcn) { pFEpLiiiI_t fn = (pFEpLiiiI_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(int64_t, R_ESP + 24))); } void iFEpippppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpippppp_t fn = (iFEpippppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24), from_ptriv(R_ESP + 28)); } @@ -579,6 +635,8 @@ void KFpBp_a_32(x64emu_t *emu, uintptr_t fcn) { KFpBp_a_t fn = (KFpBp_a_t)fcn; s void iFEvpV_32(x64emu_t *emu, uintptr_t fcn) { iFEpV_t fn = (iFEpV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 8), from_ptrv(R_ESP + 12)); } void UFsvvs_32(x64emu_t *emu, uintptr_t fcn) { UFss_t fn = (UFss_t)fcn; ui64_t r; r.u = (uint64_t)fn(from_ptrv(R_ESP + 4), from_ptrv(R_ESP + 12)); R_EAX = r.d[0]; R_EDX = r.d[1]; } void pFEppv_32(x64emu_t *emu, uintptr_t fcn) { pFEpp_t fn = (pFEpp_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8))); } +void LFpBp_iv_32(x64emu_t *emu, uintptr_t fcn) { LFpBp_i_t fn = (LFpBp_i_t)fcn; struct_p_t arg_8; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } +void iFEivpV_32(x64emu_t *emu, uintptr_t fcn) { iFEipV_t fn = (iFEipV_t)fcn; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEpvpp_32(x64emu_t *emu, uintptr_t fcn) { iFEppp_t fn = (iFEppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFEhvpV_32(x64emu_t *emu, uintptr_t fcn) { iFEhpV_t fn = (iFEhpV_t)fcn; R_EAX = fn(emu, from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEpvvpV_32(x64emu_t *emu, uintptr_t fcn) { iFEppV_t fn = (iFEppV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 16), from_ptrv(R_ESP + 20)); } @@ -605,7 +663,8 @@ int isRetX87Wrapper32(wrapper_t fun) { if (fun == &fFppa_32) return 1; if (fun == &dFddd_32) return 1; if (fun == &dFddp_32) return 1; - if (fun == &dFppa_32) return 1; + if (fun == &dFpBp_i_32) return 1; + if (fun == &dFpBp_a_32) return 1; #if defined(HAVE_LD80BITS) if (fun == &DFD_32) return 1; if (fun == &DFDD_32) return 1; diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index c1979829..a5b66b50 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -98,6 +98,7 @@ void iFiu_32(x64emu_t *emu, uintptr_t fnc); void iFip_32(x64emu_t *emu, uintptr_t fnc); void iFih_32(x64emu_t *emu, uintptr_t fnc); void iFia_32(x64emu_t *emu, uintptr_t fnc); +void iFui_32(x64emu_t *emu, uintptr_t fnc); void iFuu_32(x64emu_t *emu, uintptr_t fnc); void iFup_32(x64emu_t *emu, uintptr_t fnc); void iFli_32(x64emu_t *emu, uintptr_t fnc); @@ -106,6 +107,7 @@ void iFpu_32(x64emu_t *emu, uintptr_t fnc); void iFpL_32(x64emu_t *emu, uintptr_t fnc); void iFpp_32(x64emu_t *emu, uintptr_t fnc); void iFph_32(x64emu_t *emu, uintptr_t fnc); +void iFpV_32(x64emu_t *emu, uintptr_t fnc); void iFhp_32(x64emu_t *emu, uintptr_t fnc); void iFhh_32(x64emu_t *emu, uintptr_t fnc); void IFII_32(x64emu_t *emu, uintptr_t fnc); @@ -128,14 +130,17 @@ void dFdp_32(x64emu_t *emu, uintptr_t fnc); void LFpL_32(x64emu_t *emu, uintptr_t fnc); void LFpp_32(x64emu_t *emu, uintptr_t fnc); void pFEv_32(x64emu_t *emu, uintptr_t fnc); +void pFEu_32(x64emu_t *emu, uintptr_t fnc); void pFEp_32(x64emu_t *emu, uintptr_t fnc); void pFia_32(x64emu_t *emu, uintptr_t fnc); void pFLL_32(x64emu_t *emu, uintptr_t fnc); void pFpi_32(x64emu_t *emu, uintptr_t fnc); void pFpL_32(x64emu_t *emu, uintptr_t fnc); void pFpp_32(x64emu_t *emu, uintptr_t fnc); +void hFpp_32(x64emu_t *emu, uintptr_t fnc); void tFip_32(x64emu_t *emu, uintptr_t fnc); void tFpL_32(x64emu_t *emu, uintptr_t fnc); +void iFEbp__32(x64emu_t *emu, uintptr_t fnc); void iFHBp__32(x64emu_t *emu, uintptr_t fnc); void fFpBp__32(x64emu_t *emu, uintptr_t fnc); void dFpBp__32(x64emu_t *emu, uintptr_t fnc); @@ -156,6 +161,7 @@ void iFEpi_32(x64emu_t *emu, uintptr_t fnc); void iFEpL_32(x64emu_t *emu, uintptr_t fnc); void iFEpp_32(x64emu_t *emu, uintptr_t fnc); void iFEpV_32(x64emu_t *emu, uintptr_t fnc); +void iFEhi_32(x64emu_t *emu, uintptr_t fnc); void iFEhp_32(x64emu_t *emu, uintptr_t fnc); void iFiii_32(x64emu_t *emu, uintptr_t fnc); void iFiiI_32(x64emu_t *emu, uintptr_t fnc); @@ -194,13 +200,14 @@ void fFffp_32(x64emu_t *emu, uintptr_t fnc); void fFppa_32(x64emu_t *emu, uintptr_t fnc); void dFddd_32(x64emu_t *emu, uintptr_t fnc); void dFddp_32(x64emu_t *emu, uintptr_t fnc); -void dFppa_32(x64emu_t *emu, uintptr_t fnc); void lFipL_32(x64emu_t *emu, uintptr_t fnc); void lFlpi_32(x64emu_t *emu, uintptr_t fnc); void LFpip_32(x64emu_t *emu, uintptr_t fnc); void pFEip_32(x64emu_t *emu, uintptr_t fnc); void pFEpi_32(x64emu_t *emu, uintptr_t fnc); void pFEpp_32(x64emu_t *emu, uintptr_t fnc); +void pFipi_32(x64emu_t *emu, uintptr_t fnc); +void pFpii_32(x64emu_t *emu, uintptr_t fnc); void pFpiL_32(x64emu_t *emu, uintptr_t fnc); void pFpih_32(x64emu_t *emu, uintptr_t fnc); void pFpuL_32(x64emu_t *emu, uintptr_t fnc); @@ -213,14 +220,19 @@ void tFipu_32(x64emu_t *emu, uintptr_t fnc); void iFpBp_i_32(x64emu_t *emu, uintptr_t fnc); void IFpBp_i_32(x64emu_t *emu, uintptr_t fnc); void UFpBp_i_32(x64emu_t *emu, uintptr_t fnc); +void dFpBp_i_32(x64emu_t *emu, uintptr_t fnc); +void dFpBp_a_32(x64emu_t *emu, uintptr_t fnc); void lFpBp_i_32(x64emu_t *emu, uintptr_t fnc); void LFpBp_i_32(x64emu_t *emu, uintptr_t fnc); +void pFppriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fnc); void vFEipV_32(x64emu_t *emu, uintptr_t fnc); void vFEpup_32(x64emu_t *emu, uintptr_t fnc); void vFEppp_32(x64emu_t *emu, uintptr_t fnc); +void vFppip_32(x64emu_t *emu, uintptr_t fnc); void iFEiip_32(x64emu_t *emu, uintptr_t fnc); void iFEiiN_32(x64emu_t *emu, uintptr_t fnc); void iFEipp_32(x64emu_t *emu, uintptr_t fnc); +void iFEipV_32(x64emu_t *emu, uintptr_t fnc); void iFELup_32(x64emu_t *emu, uintptr_t fnc); void iFEpip_32(x64emu_t *emu, uintptr_t fnc); void iFEpup_32(x64emu_t *emu, uintptr_t fnc); @@ -230,13 +242,17 @@ void iFEppp_32(x64emu_t *emu, uintptr_t fnc); void iFEppV_32(x64emu_t *emu, uintptr_t fnc); void iFEpOu_32(x64emu_t *emu, uintptr_t fnc); void iFEhpV_32(x64emu_t *emu, uintptr_t fnc); +void iFiiip_32(x64emu_t *emu, uintptr_t fnc); void iFiiiN_32(x64emu_t *emu, uintptr_t fnc); -void iFiiII_32(x64emu_t *emu, uintptr_t fnc); +void iFiill_32(x64emu_t *emu, uintptr_t fnc); void iFiuui_32(x64emu_t *emu, uintptr_t fnc); void iFipii_32(x64emu_t *emu, uintptr_t fnc); void iFipup_32(x64emu_t *emu, uintptr_t fnc); +void iFippi_32(x64emu_t *emu, uintptr_t fnc); void iFuupi_32(x64emu_t *emu, uintptr_t fnc); void iFhpiL_32(x64emu_t *emu, uintptr_t fnc); +void lFEipi_32(x64emu_t *emu, uintptr_t fnc); +void lFiipL_32(x64emu_t *emu, uintptr_t fnc); void lFipLi_32(x64emu_t *emu, uintptr_t fnc); void LFpLLh_32(x64emu_t *emu, uintptr_t fnc); void LFppLp_32(x64emu_t *emu, uintptr_t fnc); @@ -245,29 +261,41 @@ void pFEppi_32(x64emu_t *emu, uintptr_t fnc); void pFEppp_32(x64emu_t *emu, uintptr_t fnc); void pFpiLL_32(x64emu_t *emu, uintptr_t fnc); void pFppLL_32(x64emu_t *emu, uintptr_t fnc); +void IFpBp_ii_32(x64emu_t *emu, uintptr_t fnc); +void UFpBp_ii_32(x64emu_t *emu, uintptr_t fnc); +void lFiibp_L_32(x64emu_t *emu, uintptr_t fnc); void LFpbp_Lp_32(x64emu_t *emu, uintptr_t fnc); void iFEpprLL__32(x64emu_t *emu, uintptr_t fnc); void LFpLpriiiiiiiiilt__32(x64emu_t *emu, uintptr_t fnc); void vFEpLLp_32(x64emu_t *emu, uintptr_t fnc); +void iFEiiip_32(x64emu_t *emu, uintptr_t fnc); +void iFEipii_32(x64emu_t *emu, uintptr_t fnc); void iFEpupV_32(x64emu_t *emu, uintptr_t fnc); void iFEpLpV_32(x64emu_t *emu, uintptr_t fnc); void iFEppiV_32(x64emu_t *emu, uintptr_t fnc); void iFEpppi_32(x64emu_t *emu, uintptr_t fnc); void iFEpppp_32(x64emu_t *emu, uintptr_t fnc); void iFiiipu_32(x64emu_t *emu, uintptr_t fnc); +void iFiiipp_32(x64emu_t *emu, uintptr_t fnc); void iFiLLLL_32(x64emu_t *emu, uintptr_t fnc); +void iFipLLi_32(x64emu_t *emu, uintptr_t fnc); void iFpppup_32(x64emu_t *emu, uintptr_t fnc); +void uFpLLLh_32(x64emu_t *emu, uintptr_t fnc); void LFpLppa_32(x64emu_t *emu, uintptr_t fnc); void iFEBh_ppp_32(x64emu_t *emu, uintptr_t fnc); void LFpbp_LLp_32(x64emu_t *emu, uintptr_t fnc); void LFpBp_LLp_32(x64emu_t *emu, uintptr_t fnc); +void iFippprLL__32(x64emu_t *emu, uintptr_t fnc); void LFLbp_bL_Bp_BL__32(x64emu_t *emu, uintptr_t fnc); void LFpLpriiiiiiiiilt_a_32(x64emu_t *emu, uintptr_t fnc); void iFEpippp_32(x64emu_t *emu, uintptr_t fnc); void iFEpuppp_32(x64emu_t *emu, uintptr_t fnc); void iFEpLppp_32(x64emu_t *emu, uintptr_t fnc); +void lFipLipu_32(x64emu_t *emu, uintptr_t fnc); +void lFipLipp_32(x64emu_t *emu, uintptr_t fnc); void pFEpLLiN_32(x64emu_t *emu, uintptr_t fnc); void iFEpLiipV_32(x64emu_t *emu, uintptr_t fnc); +void iFpupLpLi_32(x64emu_t *emu, uintptr_t fnc); void pFEpLiiii_32(x64emu_t *emu, uintptr_t fnc); void pFEpLiiiI_32(x64emu_t *emu, uintptr_t fnc); void iFEpippppp_32(x64emu_t *emu, uintptr_t fnc); @@ -293,6 +321,8 @@ void KFpBp_a_32(x64emu_t *emu, uintptr_t fnc); void iFEvpV_32(x64emu_t *emu, uintptr_t fnc); void UFsvvs_32(x64emu_t *emu, uintptr_t fnc); void pFEppv_32(x64emu_t *emu, uintptr_t fnc); +void LFpBp_iv_32(x64emu_t *emu, uintptr_t fnc); +void iFEivpV_32(x64emu_t *emu, uintptr_t fnc); void iFEpvpp_32(x64emu_t *emu, uintptr_t fnc); void iFEhvpV_32(x64emu_t *emu, uintptr_t fnc); void iFEpvvpV_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c index b1d70e70..88031874 100755 --- a/src/wrapped32/wrappedlibc.c +++ b/src/wrapped32/wrappedlibc.c @@ -18,15 +18,12 @@ #include <ctype.h> #include <dirent.h> #include <search.h> -#include <sys/types.h> #include <poll.h> #include <sys/epoll.h> #include <ftw.h> #include <sys/syscall.h> -#include <sys/socket.h> #include <sys/utsname.h> #include <sys/mman.h> -#include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> #include <setjmp.h> @@ -37,8 +34,6 @@ #include <locale.h> #include <sys/resource.h> #include <sys/statvfs.h> -#include <sys/socket.h> -#include <netdb.h> #include "wrappedlibs.h" @@ -355,11 +350,12 @@ static int my32_compare_dir_##A(const struct dirent* a, const struct dirent* b) } SUPER() #undef GO +int my32_alphasort64(x64emu_t* emu, ptr_t* d1_, ptr_t* d2_); static void* findcompare_dirFct(void* fct) { if(!fct) return NULL; void* p; - if((p = GetNativeFnc((uintptr_t)fct))) return p; + if((p = GetNativeFnc((uintptr_t)fct))) { if(p==my32_alphasort64) return alphasort64; else return p; } #define GO(A) if(my32_compare_dir_fct_##A == (uintptr_t)fct) return my32_compare_dir_##A; SUPER() #undef GO @@ -792,12 +788,12 @@ EXPORT int my32_vwprintf(x64emu_t *emu, void* fmt, void* b) { return ((iFpp_t)f)(fmt, b); #endif } - +#endif EXPORT void *my32_div(void *result, int numerator, int denominator) { *(div_t *)result = div(numerator, denominator); return result; } -#endif + EXPORT int my32_snprintf(x64emu_t* emu, void* buff, size_t s, void * fmt, void * b) { // need to align on arm myStackAlign32((const char*)fmt, b, emu->scratch); @@ -864,42 +860,28 @@ EXPORT int my32___vsprintf_chk(x64emu_t* emu, void* buff, int flags, size_t len, return r; #endif } - -#ifdef POWERPCLE +#endif EXPORT int my32_vfscanf(x64emu_t* emu, void* stream, void* fmt, void* b) // probably uneeded to do a GOM, a simple wrap should enough { - //myStackAlign32((const char*)fmt, (uint32_t*)b, emu->scratch); - PREPARE_VALIST_32_(b); - void* f = vfscanf; - - return ((iFppp_t)f)(stream, fmt, VARARGS_32_(b)); + myStackAlignScanf32((const char*)fmt, (uint32_t*)b, emu->scratch); + PREPARE_VALIST_32; + return vfscanf(stream, fmt, VARARGS_32); } - - EXPORT int my32__IO_vfscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my32_vfscanf"))); -EXPORT int my32___isoc99_vsscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my32_vsscanf"))); - EXPORT int my32___isoc99_vfscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my32_vfscanf"))); EXPORT int my32___isoc99_fscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my32_vfscanf"))); +EXPORT int my32_fscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my32_vfscanf"))); -EXPORT int my32___isoc99_sscanf(x64emu_t* emu, void* stream, void* fmt, void* b) -{ - void* f = sscanf; - PREPARE_VALIST_32; - - return ((iFppp_t)f)(stream, fmt, VARARGS_32); -} -#endif -#endif EXPORT int my32_vsscanf(x64emu_t* emu, void* buff, void* fmt, void* b) { myStackAlignScanf32((const char*)fmt, (uint32_t*)b, emu->scratch); PREPARE_VALIST_32; - vsscanf(buff, fmt, VARARGS_32); + return vsscanf(buff, fmt, VARARGS_32); } - +EXPORT int my32___isoc99_vsscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my32_vsscanf"))); EXPORT int my32__vsscanf(x64emu_t* emu, void* buff, void* fmt, void* b) __attribute__((alias("my32_vsscanf"))); EXPORT int my32_sscanf(x64emu_t* emu, void* buff, void* fmt, void* b) __attribute__((alias("my32_vsscanf"))); +EXPORT int my32___isoc99_sscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my32_vsscanf"))); EXPORT int my32_vsnprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) { // need to align on arm @@ -1117,13 +1099,12 @@ static int FillStatFromStat64(int vers, const struct stat64 *st64, void *st32) i386st->__unused5 = 0; return 0; } -#if 0 -#ifdef ANDROID + EXPORT int my32_stat(char* path, void* buf) { struct stat64 st; int r = stat64(path, &st); - UnalignStat64(&st, buf); + UnalignStat64_32(&st, buf); return r; } @@ -1131,7 +1112,7 @@ EXPORT int my32_fstat(int fd, void* buf) { struct stat64 st; int r = fstat64(fd, &st); - UnalignStat64(&st, buf); + UnalignStat64_32(&st, buf); return r; } @@ -1139,35 +1120,19 @@ EXPORT int my32_lstat(char* path, void* buf) { struct stat64 st; int r = lstat64(path, &st); - UnalignStat64(&st, buf); + UnalignStat64_32(&st, buf); return r; } -#endif EXPORT int my32___fxstat(x64emu_t *emu, int vers, int fd, void* buf) { - if (vers == 1) - { - static iFiip_t f = NULL; - if(!f) { - library_t* lib = my_lib; - if(!lib) - { - errno = EINVAL; - return -1; - } - f = (iFiip_t)dlsym(lib->priv.w.lib, "__fxstat"); - } - - return f(vers, fd, buf); - } struct stat64 st; int r = fstat64(fd, &st); if (r) return r; r = FillStatFromStat64(vers, &st, buf); return r; } -#endif + EXPORT int my32___fxstat64(x64emu_t *emu, int vers, int fd, void* buf) { struct stat64 st; @@ -1574,7 +1539,7 @@ EXPORT int32_t my32_read(int fd, void* buf, uint32_t count) { int ret = read(fd, buf, count); #ifdef DYNAREC - if(ret!=count && ret>0) { + if(ret!=count && ret>0 && box64_dynarec) { // continue reading... void* p = buf+ret; if(hasDBFromAddress((uintptr_t)p)) { @@ -1764,8 +1729,7 @@ EXPORT void* my32_ldiv(x64emu_t* emu, void* p, int32_t num, int32_t den) *((ldiv_t*)p) = ldiv(num, den); return p; } - -#ifndef NOALIGN +#endif EXPORT int my32_epoll_create(x64emu_t* emu, int size) { return epoll_create(size); @@ -1778,7 +1742,7 @@ EXPORT int32_t my32_epoll_ctl(x64emu_t* emu, int32_t epfd, int32_t op, int32_t f { struct epoll_event _event[1] = {0}; if(event && (op!=EPOLL_CTL_DEL)) - AlignEpollEvent(_event, event, 1); + AlignEpollEvent32(_event, event, 1); return epoll_ctl(epfd, op, fd, event?_event:event); } EXPORT int32_t my32_epoll_wait(x64emu_t* emu, int32_t epfd, void* events, int32_t maxevents, int32_t timeout) @@ -1787,11 +1751,10 @@ EXPORT int32_t my32_epoll_wait(x64emu_t* emu, int32_t epfd, void* events, int32_ //AlignEpollEvent(_events, events, maxevents); int32_t ret = epoll_wait(epfd, events?_events:NULL, maxevents, timeout); if(ret>0) - UnalignEpollEvent(events, _events, ret); + UnalignEpollEvent32(events, _events, ret); return ret; } -#endif - +#if 0 EXPORT int32_t my32_glob(x64emu_t *emu, void* pat, int32_t flags, void* errfnc, void* pglob) { static iFpipp_t f = NULL; @@ -1951,45 +1914,43 @@ EXPORT int32_t my32_execve(x64emu_t* emu, const char* path, ptr_t argv[], ptr_t return execve(path, (void*)newargv, newenvp); } -#if 0 + // execvp should use PATH to search for the program first -EXPORT int32_t my32_execvp(x64emu_t* emu, const char* path, char* const argv[]) +EXPORT int32_t my32_execvp(x64emu_t* emu, const char* path, ptr_t argv[]) { // need to use BOX32_PATH / PATH here... - char* fullpath = ResolveFile(path, &my_context->box32_path); - // use fullpath... + char* fullpath = ResolveFile(path, &my_context->box64_path); + // use fullpath now int self = isProcSelf(fullpath, "exe"); int x86 = FileIsX86ELF(fullpath); - int x64 = my_context->box64path?FileIsX64ELF(path):0; - printf_log(LOG_DEBUG, "execvp(\"%s\", %p), IsX86=%d / fullpath=\"%s\"\n", path, argv, x86, fullpath); - free(fullpath); - if (x86 || self) { + int x64 = FileIsX64ELF(fullpath); + printf_log(LOG_DEBUG, "execv(\"%s\", %p) is x86=%d\n", fullpath, argv, x86); + if (x86 || x64 || self) { + int skip_first = 0; + if(strlen(fullpath)>=strlen("wine-preloader") && strcmp(fullpath+strlen(fullpath)-strlen("wine-preloader"), "wine-preloader")==0) + skip_first++; // count argv... - int i=0; - while(argv[i]) ++i; - char** newargv = (char**)calloc(i+2, sizeof(char*)); + int n=skip_first; + while(argv[n]) ++n; + const char** newargv = (const char**)calloc(n+2, sizeof(char*)); newargv[0] = x64?emu->context->box64path:emu->context->box64path; - for (int j=0; j<i; ++j) - newargv[j+1] = argv[j]; + for(int i=0; i<n; ++i) + newargv[i+1] = from_ptrv(argv[skip_first+i]); if(self) newargv[1] = emu->context->fullpath; - printf_log(LOG_DEBUG, " => execvp(\"%s\", %p [\"%s\", \"%s\"...:%d])\n", newargv[0], newargv, newargv[1], i?newargv[2]:"", i); - int ret = execvp(newargv[0], newargv); + printf_log(LOG_DEBUG, " => execv(\"%s\", %p [\"%s\", \"%s\", \"%s\"...:%d])\n", emu->context->box64path, newargv, newargv[0], n?newargv[1]:"", (n>1)?newargv[2]:"",n); + int ret = execv(newargv[0], (char* const*)newargv); free(newargv); return ret; } - if((!strcmp(path + strlen(path) - strlen("/uname"), "/uname") || !strcmp(path, "uname")) - && argv[1] && (!strcmp(argv[1], "-m") || !strcmp(argv[1], "-p") || !strcmp(argv[1], "-i")) - && !argv[2]) { - // uname -m is redirected to box32 -m - path = my_context->box64path; - char *argv2[3] = { my_context->box64path, argv[1], NULL }; - return execvp(path, argv2); - } - - // fullpath is gone, so the search will only be on PATH, not on BOX32_PATH (is that an issue?) - return execvp(path, argv); + // count argv and create the 64bits argv version + int n=0; + while(argv[n]) ++n; + char** newargv = (char**)calloc(n+1, sizeof(char*)); + for(int i=0; i<=n; ++i) + newargv[i+1] = from_ptrv(argv[i]); + return execv(fullpath, (void*)newargv); } - +#if 0 // execvp should use PATH to search for the program first EXPORT int32_t my32_posix_spawnp(x64emu_t* emu, pid_t* pid, const char* path, const posix_spawn_file_actions_t *actions, const posix_spawnattr_t* attrp, char* const argv[], char* const envp[]) @@ -2057,6 +2018,19 @@ EXPORT int my32_setrlimit(x64emu_t* emu, int what, uint32_t* pr) return setrlimit64(what, &l); } +EXPORT void* my32_localtime(x64emu_t* emu, void* t) +{ + struct_L_t t_ = {0}; + static struct_iiiiiiiiilt_t res_ = {0}; + if(t) from_struct_L(&t_, to_ptrv(t)); + void* ret = localtime(t?((void*)&t_):NULL); + if(ret) { + to_struct_iiiiiiiiilt(to_ptrv(&res_), ret); + return &res_; + } + return NULL; +} + EXPORT void* my32_localtime_r(x64emu_t* emu, void* t, void* res) { struct_L_t t_ = {0}; @@ -2071,6 +2045,19 @@ EXPORT void* my32_localtime_r(x64emu_t* emu, void* t, void* res) return NULL; } +EXPORT void* my32_gmtime(x64emu_t* emu, void* t) +{ + struct_L_t t_ = {0}; + static struct_iiiiiiiiilt_t res_ = {0}; + if(t) from_struct_L(&t_, to_ptrv(t)); + void* ret = gmtime(t?((void*)&t_):NULL); + if(ret) { + to_struct_iiiiiiiiilt(to_ptrv(&res_), ret); + return &res_; + } + return NULL; +} + EXPORT void* my32_gmtime_r(x64emu_t* emu, void* t, void* res) { struct_L_t t_ = {0}; @@ -2100,31 +2087,36 @@ EXPORT int32_t my32_getrandom(x64emu_t* emu, void* buf, uint32_t buflen, uint32_ fclose(rnd); return r; } +#endif + +struct i386_passwd +{ + ptr_t pw_name; // char * + ptr_t pw_passwd; // char * + uint32_t pw_uid; + uint32_t pw_gid; + ptr_t pw_gecos; // char * + ptr_t pw_dir; // char * + ptr_t pw_shell; // char * +}; -static struct passwd fakepwd = {}; EXPORT void* my32_getpwuid(x64emu_t* emu, uint32_t uid) { - void *ret = NULL; - library_t* lib = my_lib; - if(!lib) return 0; - void* f = dlsym(lib->priv.w.lib, "getpwuid"); - if(f) - ret = ((pFu_t)f)(uid); - - // In case of failure, provide a fake one. Evil hack :/ - if (!ret && !fakepwd.pw_name) { - fakepwd.pw_name = strdup("root"); - fakepwd.pw_passwd = strdup("fakehash"); - fakepwd.pw_uid = 0; - fakepwd.pw_gid = 0; - fakepwd.pw_gecos = strdup("root"); - fakepwd.pw_dir = getenv("HOME"); - fakepwd.pw_shell = strdup("/bin/bash"); + static struct i386_passwd ret; + struct passwd* p = getpwuid(uid); + if(p) { + ret.pw_name = to_cstring(p->pw_name); + ret.pw_passwd = to_cstring(p->pw_passwd); + ret.pw_uid = p->pw_uid; + ret.pw_gid = p->pw_gid; + ret.pw_gecos = to_cstring(p->pw_gecos); + ret.pw_dir = to_cstring(p->pw_dir); + ret.pw_shell = to_cstring(p->pw_shell); + return &ret; } - - return ret ? ret : (void*)&fakepwd; + return NULL; } - +#if 0 EXPORT int32_t my32_recvmmsg(x64emu_t* emu, int32_t fd, void* msgvec, uint32_t vlen, uint32_t flags, void* timeout) { // Implemented starting glibc 2.12+ @@ -2148,7 +2140,7 @@ EXPORT int32_t my32___sendmmsg(x64emu_t* emu, int32_t fd, void* msgvec, uint32_t // Use the syscall return syscall(__NR_sendmmsg, fd, msgvec, vlen, flags); } - +#endif EXPORT int32_t my32___register_atfork(x64emu_t *emu, void* prepare, void* parent, void* child, void* handle) { // this is partly incorrect, because the emulated funcionts should be executed by actual fork and not by my32_atfork... @@ -2181,7 +2173,6 @@ EXPORT int32_t my32___poll_chk(void* a, uint32_t b, int c, int l) return poll(a, b, c); // no check... } -#endif EXPORT int32_t my32_fcntl64(x64emu_t* emu, int32_t a, int32_t b, uint32_t d1, uint32_t d2, uint32_t d3, uint32_t d4, uint32_t d5, uint32_t d6) { // Implemented starting glibc 2.14+ @@ -2273,22 +2264,6 @@ EXPORT int32_t my32_accept4(x64emu_t* emu, int32_t fd, void* a, void* l, int32_t return syscall(__NR_accept4, fd, a, l, flags); } -EXPORT int32_t my32_fallocate64(int fd, int mode, int64_t offs, int64_t len) -{ - iFiiII_t f = NULL; - static int done = 0; - if(!done) { - library_t* lib = my_lib; - f = (iFiiII_t)dlsym(lib->priv.w.lib, "fallocate64"); - done = 1; - } - if(f) - return f(fd, mode, offs, len); - else - return syscall(__NR_fallocate, fd, mode, (uint32_t)(offs&0xffffffff), (uint32_t)((offs>>32)&0xffffffff), (uint32_t)(len&0xffffffff), (uint32_t)((len>>32)&0xffffffff)); - //return posix_fallocate64(fd, offs, len); -} - EXPORT int my32_getopt(int argc, char* const argv[], const char *optstring) { int ret = getopt(argc, argv, optstring); @@ -2311,81 +2286,6 @@ EXPORT int my32_getopt_long_only(int argc, char* const argv[], const char* optst } #endif -EXPORT int my32_getaddrinfo(x64emu_t* emu, void* node, void* service, struct i386_addrinfo* hints, ptr_t* res) -{ - struct addrinfo* hints_ = (struct addrinfo*)hints; // only first part is used, wich is identical - struct addrinfo* p = {0}; - int ret = getaddrinfo(node, service, hints_, &p); - if(!ret && p) { - // counting the number of "next" - struct addrinfo* p2 = p; - int idx = 0; - while(p2) {++idx; p2 = p2->ai_next;} - // doing the malloc! - void* r = box_malloc(idx*sizeof(struct i386_addrinfo)+sizeof(void*)); - ptr_t p3 = to_ptrv(r); - *res = p3; - p2 = p; - for(int i=0; i<idx; ++i) { - struct i386_addrinfo* dest = (struct i386_addrinfo*)from_ptrv(p3); - p3+=sizeof(struct i386_addrinfo); - if(!i) { - *(void**)from_ptrv(p3) = p; - p3+=sizeof(void*); - } - dest->ai_flags = p2->ai_flags; - dest->ai_family = p2->ai_family; - dest->ai_socktype = p2->ai_socktype; - dest->ai_protocol = p2->ai_protocol; - dest->ai_addrlen = p2->ai_addrlen; - dest->ai_addr = to_ptrv(p2->ai_addr); - dest->ai_canonname = to_cstring(p2->ai_canonname); - p2 = p2->ai_next; - dest->ai_next = p2?p3:0; - } - } else - *res = 0; - return ret; -} - -EXPORT void my32_freeaddrinfo(x64emu_t* emu, void* a) { - if(!a) return; - void* orig = *(void**)(a+sizeof(struct i386_addrinfo)); - freeaddrinfo(orig); - box_free(a); -} - -EXPORT void* my32_gethostbyname(x64emu_t* emu, const char* a) -{ - static struct i386_hostent ret = {0}; - static ptr_t strings[128] = {0}; - struct hostent* h = gethostbyname(a); - if(!h) return NULL; - // convert... - ret.h_name = to_cstring(h->h_name); - ret.h_addrtype = h->h_addrtype; - ret.h_length = h->h_length; - ptr_t s = to_ptrv(&strings); - int idx = 0; - ret.h_aliases = h->h_aliases?s:0; - if(h->h_aliases) { - char* p = *h->h_aliases; - while(p) { - strings[idx++] = to_cstring(p++); - } - strings[idx++] = 0; - } - ret.h_addr_list = h->h_addr_list?to_ptrv(&strings[idx]):0; - if(h->h_addr_list) { - void* p = *h->h_addr_list; - while(p) - strings[idx++] = to_ptrv(p++); - strings[idx++] = 0; - } - // done - return &ret; -} - EXPORT int my32_alphasort64(x64emu_t* emu, ptr_t* d1_, ptr_t* d2_) { const struct dirent64* d1 = NULL; @@ -2538,7 +2438,6 @@ EXPORT void* my32_localeconv(x64emu_t* emu) return &ret; } - EXPORT struct __processor_model { unsigned int __cpu_vendor; @@ -2965,6 +2864,39 @@ EXPORT int my32_utimes(x64emu_t* emu, const char* name, uint32_t* times) return utimes(name, tm); } +EXPORT int my32_futimes(x64emu_t* emu, int fd, uint32_t* times) +{ + struct timeval tm[2]; + tm[0].tv_sec = times[0]; + tm[0].tv_usec = times[1]; + tm[1].tv_sec = times[2]; + tm[1].tv_usec = times[3]; + return futimes(fd, tm); +} + +EXPORT int my32_strtol(const char* s, char** endp, int base) +{ + long ret = strtol(s, endp, base); + if (ret<INT_MIN) { + ret = INT_MIN; + errno = ERANGE; + } else if(ret>INT_MAX) { + ret = INT_MAX; + errno = ERANGE; + } + return ret; +} + +EXPORT unsigned int my32_strtoul(const char* s, char** endp, int base) +{ + unsigned long ret = strtoul(s, endp, base); + if(ret>UINT_MAX) { + ret = UINT_MAX; + errno = ERANGE; + } + return ret; +} + // wrapped malloc using calloc, it seems x86 malloc set alloc'd block to zero somehow EXPORT void* my32_malloc(unsigned long size) { @@ -3040,15 +2972,6 @@ EXPORT int my32_on_exit(x64emu_t* emu, void* f, void* args) #endif #endif -EXPORT long my32_strtol(void* nptr, ptr_t* endptr, int base) -{ - void* endp; - long ret = strtol(nptr, (char**)(endptr?(&endp):NULL), base); - if(endptr) - *endptr = to_ptrv(endp); - return ret; -} - EXPORT char** my32_environ = NULL; EXPORT char** my32__environ = NULL; EXPORT char** my32___environ = NULL; // all aliases diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h index c51f87d3..5c4e37ce 100755 --- a/src/wrapped32/wrappedlibc_private.h +++ b/src/wrapped32/wrappedlibc_private.h @@ -6,14 +6,17 @@ // locale_t needs special handling, with to_locale / from_locale (and is a / A) // struct utimbuf is: LL // struct timespec is: LL +// struct timeval is: LL // struct tm is: iiiiiiiiilt // time_t is: L +// socklen_t is u +// struct sockaddr is fine, no wrap needed // a64l GO(abort, vFv) -//GO(abs, iFi) -//GOW(accept, iFipp) -//GOM(accept4, iFEippi) //%% glibc 2.10+ +GO(abs, iFi) +GOW(accept, iFipp) +GOW(accept4, iFippi) GOW(access, iFpi) // acct //GOW(addmntent, iFpp) @@ -75,7 +78,7 @@ GOW(asctime_r, pFriiiiiiiiilt_p) //GOM(__asprintf, iFEppV) //%% //GOM(__asprintf_chk, iFEpipV) //%% // __assert -//GO(__assert_fail, vFppup) +GO(__assert_fail, vFppip) //GO(__assert_perror_fail, vFipup) //GO(atof, dFp) //GO(atoi, iFp) @@ -133,7 +136,7 @@ GOW(chmod, iFpu) GOW(chown, iFpuu) //GO(chroot, iFp) //GOW(clearenv, iFv) -//GO(clearerr, vFp) +GO(clearerr, vFh) //GO(clearerr_unlocked, vFp) // clnt_broadcast // clnt_create @@ -203,7 +206,7 @@ GO(__dgettext, pFpp) //GO(difftime, dFuu) //GO(dirfd, iFp) //GO(dirname, pFp) -//GOS(div, pFpii) //%%,noE +GOS(div, pFpii) //%%,noE // _dl_addr GO2(dl_iterate_phdr, iFEpp, my_dl_iterate_phdr) //%% // _dl_mcount_wrapper @@ -214,7 +217,7 @@ GO2(dl_iterate_phdr, iFEpp, my_dl_iterate_phdr) //%% // _dl_vsym //GOW(dngettext, pFpppu) //GOM(dprintf, iFEipV) -//GOM(__dprintf_chk, iFEivpV) //%% +GOM(__dprintf_chk, iFEivpV) //%% GO(drand48, dFv) // drand48_r GOW(dup, iFi) @@ -256,9 +259,9 @@ GOW(endutent, vFv) // envz_strip GOM(epoll_create, iFEi) //%% not needed, but used in syscall GOM(epoll_create1, iFEO) //%% -//GOM(epoll_ctl, iFEiiip) //%% align epool_event structure +GOM(epoll_ctl, iFEiiip) //%% align epool_event structure // epoll_pwait -//GOM(epoll_wait, iFEipii) //%% need realign of epoll_event structure +GOM(epoll_wait, iFEipii) //%% need realign of epoll_event structure // erand48 // erand48_r // Weak //GO(err, vFippppppppp) @@ -278,15 +281,15 @@ GOM(__errno_location, pFEv) //GO(ether_ntoa_r, pFpp) //GO(ether_ntohost, iFpp) //GOW(euidaccess, iFpi) -//GO(eventfd, iFui) +GO(eventfd, iFui) //GO(eventfd_read, iFip) //GO(eventfd_write, iFiU) -//GO2(execl, iFEpV, my_execv) -//GO2(execle, iFEpV, my_execve) // Nope! This one needs wrapping, because is char*, char*, ..., char*[] -//GO2(execlp, iFpV, execvp) +GO2(execl, iFEpV, my32_execv) +//GO2(execle, iFEpV, my_32execve) // Nope! This one needs wrapping, because is char*, char*, ..., char*[] +GO2(execlp, iFpV, my32_execvp) GOWM(execv, iFEpp) //%% -//GOM(execve, iFEppp) //%% and this one too... -//GOWM(execvp, iFEpp) +GOM(execve, iFEppp) //%% and this one too... +GOWM(execvp, iFEpp) GO(exit, vFi) GO(_exit, vFi) GOW(_Exit, vFi) @@ -313,7 +316,7 @@ GO(fdatasync, iFi) GOW(fdopendir, pFi) GOW(feof, iFh) //GO(feof_unlocked, iFp) -//GOW(ferror, iFp) +GOW(ferror, iFh) //GO(ferror_unlocked, iFp) //GO(fexecve, iFipp) //TODO: Check if needed to be wrapped, and target checked for x86 / native? GOW(fflush, iFh) @@ -381,14 +384,14 @@ GO(fputwc, iFih) //GO(fputws_unlocked, iFpp) GOW(fread, LFpLLh) //GO(__freadable, iFp) -//GO(__fread_chk, uFpuuup) +GO(__fread_chk, uFpLLLh) //GO(__freading, iFp) //GO(fread_unlocked, uFpuup) //GO(__fread_unlocked_chk, uFpuuup) GO(free, vFp) GOM(freeaddrinfo, vFEp) //DATAV(__free_hook, 4) -//GO(freeifaddrs, vFp) +GO(freeifaddrs, vFp) GOW(freelocale, vFA) GO(__freelocale, vFA) //GO(fremovexattr, iFip) @@ -397,7 +400,7 @@ GO(freopen64, hFppH) // frexp // Weak // frexpf // Weak // frexpl // Weak -//GO2(fscanf, iFppV, vfscanf) +GOM(fscanf, iFEppV) GO(fseek, iFhli) GO(fseeko, iFhli) GO(fseeko64, iFhIi) @@ -410,7 +413,7 @@ GOWM(fstatfs64, iFip) //%%,noE //GO(fstatvfs, iFip) //GOW(fstatvfs64, iFip) // alignment? GOW(fsync, iFi) -//GOW(ftell, lFp) +GOW(ftell, lFh) GO(ftello, lFh) GO(ftello64, IFh) //GO(ftime, iFp) @@ -427,7 +430,7 @@ GOW(ftruncate64, iFiI) //GOM(ftw64, iFEppi) //%% //GOW(funlockfile, vFp) //GO(futimens, iFip) -//GOW(futimes, iFip) //int futimes(int fd, const struct timeval tv[2]) +GOWM(futimes, iFEip) //GO(futimesat, iFippp) // fwide //GOWM(fwprintf, iFEppV) //%% @@ -437,12 +440,12 @@ GOW(fwrite, LFpLLh) //GO(fwrite_unlocked, uFpuup) //GO(__fwriting, iFp) // fwscanf -//GOM(__fxstat, iFEiip) //%% +GOM(__fxstat, iFEiip) //%% GOM(__fxstat64, iFEiip) //%% need reaalign of struct stat64 //GOM(__fxstatat, iFEiippi) //%% //GOM(__fxstatat64, iFEiippi) //%% struct stat64 again // __gai_sigqueue -//GO(gai_strerror, pFi) +GO(gai_strerror, tFi) // __gconv_get_alias_db // __gconv_get_cache // __gconv_get_modules_db @@ -498,7 +501,7 @@ GOM(gethostbyname, pFEp) // gethostid GOW(gethostname, iFpL) // __gethostname_chk -//GO(getifaddrs, iFp) +GOM(getifaddrs, iFEbp_) // getipv4sourcefilter //GOW(getitimer, iFip) // get_kernel_syms // Weak @@ -512,7 +515,7 @@ GOW(gethostname, iFpL) //GOW(getmntent_r, pFpppi) // getmsg // get_myaddress -//GO(getnameinfo, iFpupupui) +GO(getnameinfo, iFpupLpLi) // getnetbyaddr // getnetbyaddr_r // getnetbyname @@ -530,7 +533,7 @@ GOW(gethostname, iFpL) GOW(getpagesize, iFv) GO(__getpagesize, iFv) //GO(getpass, pFp) -//GOW(getpeername, iFipp) +GOW(getpeername, iFipp) GOW(getpgid, uFu) // __getpgid GO(getpgrp, iFv) @@ -554,7 +557,7 @@ GOW(getpt, iFv) // getpwent_r //GO(getpwnam, pFp) //GO(getpwnam_r, iFpppup) -//GOM(getpwuid, pFEu) +GOM(getpwuid, pFEu) //GO(getpwuid_r, iFuppup) //GOW(getresgid, iFppp) //GOW(getresuid, iFppp) @@ -579,7 +582,7 @@ GO(getrlimit64, iFip) //GO(getservent_r, iFppup) GO(getsid, uFu) GOW(getsockname, iFipp) -//GOW(getsockopt, iFiiipp) +GOW(getsockopt, iFiiipp) // getsourcefilter //GO(getspent, pFv) // getspent_r @@ -617,7 +620,7 @@ GO(getwchar_unlocked, iFv) //GO(globfree, vFp) //GO(globfree64, vFp) // glob_pattern_p // Weak -//GO(gmtime, pFp) +GOM(gmtime, pFEp) //GO(__gmtime_r, pFpp) GOWM(gmtime_r, pFEpp) GO(gnu_dev_major, uFU) @@ -638,7 +641,7 @@ GO(grantpt, iFi) // hdestroy_r //DATA(h_errlist, 4) // h_errno // type B -//GO(__h_errno_location, pFv) +GOM(__h_errno_location, pFEv) //GO(herror, vFp) // h_nerr // type R // host2netname @@ -680,8 +683,8 @@ GOW(imaxdiv, IFII) // inet6_rth_reverse // inet6_rth_segments // inet6_rth_space -//GO(inet_addr, uFp) -//GOW(inet_aton, iFpp) +GO(inet_addr, uFp) +GOW(inet_aton, iFpp) // inet_lnaof // inet_makeaddr // inet_netof @@ -884,7 +887,7 @@ GO(__isnanf, iFf) //GOM(__isoc99_fscanf, iFEppV) //%% // __isoc99_fwscanf // __isoc99_scanf -//GOM(__isoc99_sscanf, iFEppV) //%% +GOM(__isoc99_sscanf, iFEppV) //%% // __isoc99_swscanf //GOM(__isoc99_vfscanf, iFEppp) //%% // __isoc99_vfwscanf @@ -1028,7 +1031,7 @@ GOW(listen, iFii) // loc1 // type B // loc2 // type B GOWM(localeconv, pFEv) -//GO(localtime, pFp) +GOM(localtime, pFEp) GOWM(localtime_r, pFEpp) GO(lockf, iFiiu) GO(lockf64, iFiiI) @@ -1089,12 +1092,12 @@ GO(__memcpy_chk, pFppLL) // memfrob //GO(memmem, pFpupu) GO(memmove, pFppL) -//GO(__memmove_chk, pFppLL) -//GO(mempcpy, pFppL) -//GO(__mempcpy, pFppu) +GO(__memmove_chk, pFppLL) +GO(mempcpy, pFppL) +GO(__mempcpy, pFppL) // __mempcpy_chk // __mempcpy_small -//GOW(memrchr, pFpiL) +GOW(memrchr, pFpiL) GO(memset, pFpiL) GO(__memset_chk, pFpiLL) //GO(mincore, iFpLp) @@ -1105,11 +1108,11 @@ GO(mkfifo, iFpu) //GO(mkfifoat, iFipu) //GO(mkostemp, iFpi) //GO(mkostemp64, iFpi) -//GO(mkstemp, iFp) +GO(mkstemp, iFp) //GO(mkstemp64, iFp) //GO(mktemp, pFp) GO(mktime, LFriiiiiiiiilt_) -//GO(mlock, iFpL) +GO(mlock, iFpL) //GO(mlockall, iFi) GOM(mmap, pFEpLiiii) //%% GOM(mmap64, pFEpLiiiI) //%% @@ -1132,7 +1135,7 @@ GOWM(mremap, pFEpLLiN) //%% 5th hidden paramerer "void* new_addr" if flags is MR //GOW(msgsnd, iFipLi) //GOW(msync, iFpLi) // mtrace -//GO(munlock, iFpL) +GO(munlock, iFpL) //GO(munlockall, iFv) GOM(munmap, iFEpL) //%% // muntrace @@ -1219,10 +1222,10 @@ GOW(opendir, pFp) // passwd2des //GOW(pathconf, iFpi) GOW(pause, iFv) -//GO(pclose, iFp) +GO(pclose, iFh) //GO(perror, vFp) // personality // Weak -//GOW(pipe, iFp) // the array of 2 int seems to converted as a pointer, on both x86 and arm (and x86_64 too) +GOW(pipe, iFp) // __pipe //GOW(pipe2, iFpO) // assuming this works the same as pipe, so pointer for array of 2 int // pivot_root @@ -1233,7 +1236,7 @@ GOW(pause, iFv) // pmap_unset GOW(poll, iFpLi) // poll have an array of struct as 1st argument GO(__poll, iFpLi) -//GO(popen, pFpp) +GO(popen, hFpp) GO(posix_fadvise, iFiuui) GO(posix_fadvise64, iFiuui) GO(posix_fallocate, iFiii) @@ -1359,17 +1362,17 @@ GO2(__realpath_chk, pFEppv, my32_realpath) // re_compile_fastmap // Weak //GOW(re_compile_pattern, pFpup) GO(recv, lFipLi) -//GO(__recv_chk, iFipuui) -//GOW(recvfrom, lFipLipp) +GO(__recv_chk, iFipLLi) +GOW(recvfrom, lFipLipp) // __recvfrom_chk //GOM(recvmmsg, iFEipuup) //%% actual recvmmsg is glibc 2.12+. The syscall is Linux 2.6.33+, so use syscall... -//GOW(recvmsg, lFipi) +GOWM(recvmsg, lFEipi) // re_exec // Weak //GOW(regcomp, iFppi) //GOW(regerror, uFippu) //GO(regexec, iFppupi) //GOW(regfree, vFp) -//GOM(__register_atfork, iFEpppp) //%% +GOM(__register_atfork, iFEpppp) //%% // register_printf_function // Weak // registerrpc // remap_file_pages // Weak @@ -1442,8 +1445,8 @@ GOW(sched_getscheduler, iFi) //GOW(sched_rr_get_interval, iFip) //GO(sched_setaffinity, iFiup) //GOW(sched_setparam, iFip) -//GO(__sched_setscheduler, iFiip) -//GOW(sched_setscheduler, iFiip) +GO(__sched_setscheduler, iFiip) +GOW(sched_setscheduler, iFiip) GO(__sched_yield, iFv) GOW(sched_yield, iFv) GO(__secure_getenv, pFp) @@ -1451,19 +1454,19 @@ GO(secure_getenv, pFp) // seed48 // seed48_r // Weak //GO(seekdir, vFpi) -//GOW(select, iFipppp) -//GO(__select, iFipppp) +GOW(select, iFippprLL_) +GO(__select, iFippprLL_) GO(semctl, iFiiiN) GOW(semget, iFuii) GOW(semop, iFipL) //GO(semtimedop, iFipup) GOW(send, lFipLi) // __send // Weak -//GO(sendfile, lFiipL) -//GO(sendfile64, lFiipL) -//GOW(sendmsg, lFipi) +GO(sendfile, lFiibp_L) +GO(sendfile64, lFiipL) +GOWM(sendmsg, lFEipi) //GOM(__sendmmsg, iFEipuu) //%% actual __sendmmsg is glibc 2.14+. The syscall is Linux 3.0+, so use syscall... -//GOW(sendto, lFipLipu) +GOW(sendto, lFipLipu) // setaliasent //GOW(setbuf, vFpp) //GOW(setbuffer, vFppL) @@ -1524,9 +1527,9 @@ GOW(setvbuf, iFhpiL) //GO(setxattr, iFpppui) // sgetspent // sgetspent_r // Weak -//GOW(shmat, pFipi) +GOW(shmat, pFipi) //GOW(shmctl, iFiip) -//GOW(shmdt, iFp) +GOW(shmdt, iFp) GOW(shmget, iFuui) GOW(shutdown, iFii) GOWM(sigaction, iFEipp) //%% @@ -1576,7 +1579,7 @@ GOM(__snprintf_chk, iFEpLiipV) //%% //GOM(__snprintf, iFEpLpV) //%% // sockatmark GOW(socket, iFiii) -//GOW(socketpair, iFiiip) +GOW(socketpair, iFiiip) //GO(splice, iFipipuu) GOM(sprintf, iFEppV) //%% GOM(__sprintf_chk, iFEpvvpV) //%% @@ -1658,7 +1661,7 @@ GO(strnlen, LFpL) GO(strpbrk, pFpp) // __strpbrk_c2 // __strpbrk_c3 -//GO(strptime, pFppp) +GO(strptime, pFppriiiiiiiiilt_) // strptime_l // Weak GO(strrchr, pFpi) //GOW(strsep, pFpp) @@ -1667,25 +1670,25 @@ GO(strrchr, pFpi) // __strsep_3c // __strsep_g //GO(strsignal, pFi) -//GO(strspn, LFpp) +GO(strspn, LFpp) // __strspn_c1 // __strspn_c2 // __strspn_c3 GO(strstr, pFpp) GO(strtod, dFpBp_) -//GO(__strtod_internal, dFppi) -GO(__strtod_l, dFppa) -GOW(strtod_l, dFppa) +GO(__strtod_internal, dFpBp_i) +GO(__strtod_l, dFpBp_a) +GOW(strtod_l, dFpBp_a) GO(strtof, fFpBp_) //GO(__strtof_internal, fFppp) GO(__strtof_l, fFppa) //GOW(strtof_l, fFppu) //GO(strtoimax, IFppi) -//GO(strtok, pFpp) +GO(strtok, pFpp) //GO(__strtok_r, pFppp) //GOW(strtok_r, pFppp) // __strtok_r_1c -GO(strtol, lFpBp_i) +GOM(strtol, lFpBp_i) //%%,noE #ifdef HAVE_LD80BITS //GO(strtold, DFpp) //GO(__strtold_internal, DFppi) @@ -1697,20 +1700,20 @@ GOW(strtold_l, DFpBp_a) GO2(__strtold_l, KFpBp_a, __strtod_l) GOW2(strtold_l, KFpBp_a, strtod_l) #endif -//GO(__strtol_internal, lFppi) +GO(__strtol_internal, lFpBp_i) GO(strtoll, IFpBp_i) //GO(__strtol_l, lFppiip) //GOW(strtol_l, lFppiip) -//GO(__strtoll_internal, IFppii) +GO(__strtoll_internal, IFpBp_ii) //GO(__strtoll_l, IFppip) //GOW(strtoll_l, IFppip) //GOW(strtoq, IFppi) // is that ok? -GO(strtoul, LFpBp_i) -//GO(__strtoul_internal, LFppii) +GOM(strtoul, LFpBp_i) //%%,noE +GO2(__strtoul_internal, LFpBp_iv, my32_strtoul) //%%,noE GO(strtoull, UFpBp_i) //GO(__strtoul_l, uFppip) //GOW(strtoul_l, LFppip) -//GO(__strtoull_internal, UFppii) +GO(__strtoull_internal, UFpBp_ii) //GO(__strtoull_l, UFppip) //GOW(strtoull_l, UFppip) //GO(strtoumax, UFppi) @@ -1854,7 +1857,7 @@ GO(ungetwc, iFih) GOW(unlink, iFp) //GO(unlinkat, iFipi) GO(unlockpt, iFi) -//GOW(unsetenv, iFp) +GOW(unsetenv, iFp) // unshare //GOW(updwtmp, vFpp) // updwtmpx @@ -2150,7 +2153,7 @@ GOM(__udivdi3, UFUU) //%%,noE GOM(__divdi3, IFII) //%%,noE //GOM(__poll_chk, iFpuii) //%%,noE -GOM(fallocate64, iFiiII) //%%,noE +GO(fallocate64, iFiill) //DATAM(__libc_stack_end, sizeof(void*)) diff --git a/src/wrapped32/wrappedlibm_private.h b/src/wrapped32/wrappedlibm_private.h index 156cfac6..cf80be7c 100755 --- a/src/wrapped32/wrappedlibm_private.h +++ b/src/wrapped32/wrappedlibm_private.h @@ -92,8 +92,8 @@ GOWM(ccosf, UFs) //%noE return complex GOWM(ccoshf, UFs) //%noE return complex // ccoshl // Weak // ccosl // Weak -//GOW(ceil, dFd) -//GOW(ceilf, fFf) +GOW(ceil, dFd) +GOW(ceilf, fFf) // ceill // Weak //GOWS(cexp, pFps) //%% return complex GOWM(cexpf, UFs) //%noE return complex diff --git a/src/wrapped32/wrappedlibpthread_private.h b/src/wrapped32/wrappedlibpthread_private.h index 9ff748d2..ca98ba5a 100755 --- a/src/wrapped32/wrappedlibpthread_private.h +++ b/src/wrapped32/wrappedlibpthread_private.h @@ -88,7 +88,7 @@ GO(pthread_join, iFHBp_) GOM(__pthread_key_create, iFEpp) GOM(pthread_key_create, iFEpp) GO(pthread_key_delete, iFu) -GOM(pthread_kill, iFEpi) +GOM(pthread_kill, iFEhi) // pthread_kill_other_threads_np GO(__pthread_mutexattr_destroy, iFp) GO(pthread_mutexattr_destroy, iFp) |