[BOX32] Improve errno handling, and added a few more libc wrapped functions

This commit is contained in:
ptitSeb 2024-11-07 13:26:55 +01:00
parent 394e81af45
commit da0e153a05
18 changed files with 3768 additions and 3242 deletions

View File

@ -759,7 +759,7 @@ class Function:
gotype = gotype[1:]
if self.retS:
self.ismy = True
assert((self.no_dlsym and (funtype.orig.name.startswith("pFp") or funtype.orig.name.startswith("pFEp")))
assert((self.no_dlsym and (funtype.orig.name.startswith("pFp") or funtype.orig.name.startswith("pFEp") or funtype.orig.name.startswith("pEp") or funtype.orig.name.startswith("pEEp")))
or (isinstance(funtype, StructFunctionType) and funtype.returnsstruct)), \
"Maybe TODO? (Returns unregistered structure)"
self._noE = self._noE or self.no_dlsym

View File

@ -554,12 +554,22 @@ void StopEmu(x64emu_t* emu, const char* reason, int is32bits)
// dump stuff...
printf_log(LOG_NONE, "==== CPU Registers ====\n%s\n", DumpCPURegs(emu, R_RIP, is32bits));
printf_log(LOG_NONE, "======== Stack ========\nStack is from %lX to %lX\n", R_RBP, R_RSP);
if (R_RBP == R_RSP) {
printf_log(LOG_NONE, "RBP = RSP: leaf function detected; next 128 bytes should be either data or random.\n");
if(emu->segs[_CS]==0x23) {
if (R_EBP == R_ESP) {
printf_log(LOG_NONE, "EBP = ESP: leaf function detected; next 128 bytes should be either data or random.\n");
} else {
// TODO: display stack if operation should be allowed (to avoid crashes)
/* for (uint64_t *sp = R_RBP; sp >= R_RSP; --sp) {
} */
}
} else {
// TODO: display stack if operation should be allowed (to avoid crashes)
/* for (uint64_t *sp = R_RBP; sp >= R_RSP; --sp) {
} */
if (R_RBP == R_RSP) {
printf_log(LOG_NONE, "RBP = RSP: leaf function detected; next 128 bytes should be either data or random.\n");
} else {
// TODO: display stack if operation should be allowed (to avoid crashes)
/* for (uint64_t *sp = R_RBP; sp >= R_RSP; --sp) {
} */
}
}
printf_log(LOG_NONE, "Old IP: %tX\n", emu->old_ip);
#ifdef HAVE_TRACE

View File

@ -148,6 +148,7 @@ EXPORT void* my32_gethostbyname(x64emu_t* emu, const char* a)
strings[idx++] = 0;
}
// done
emu->libc_herr = h_errno;
return &ret;
}

View File

@ -1387,6 +1387,7 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
{
// sig==SIGSEGV || sig==SIGBUS || sig==SIGILL || sig==SIGABRT here!
int log_minimum = (box64_showsegv)?LOG_NONE:((sig==SIGSEGV && my_context->is_sigaction[sig])?LOG_DEBUG:LOG_INFO);
if(sig==SIGABRT) log_minimum=LOG_NONE;
if(signal_jmpbuf_active) {
signal_jmpbuf_active = 0;
longjmp(SIG_JMPBUF, 1);

File diff suppressed because it is too large Load Diff

View File

@ -11,187 +11,195 @@
#define ADDED_FUNCTIONS()
#endif
typedef void (*vFv_t)(void);
typedef void (*vFp_t)(void*);
typedef int32_t (*iFv_t)(void);
typedef int32_t (*iFi_t)(int32_t);
typedef int32_t (*iFL_t)(uintptr_t);
typedef int32_t (*iFp_t)(void*);
typedef int32_t (*iFO_t)(int32_t);
typedef uint32_t (*uFp_t)(void*);
typedef uint32_t (*uFS_t)(void*);
typedef uint64_t (*UFp_t)(void*);
typedef intptr_t (*lFi_t)(int32_t);
typedef intptr_t (*lFp_t)(void*);
typedef intptr_t (*lFV_t)(...);
typedef intptr_t (*lFS_t)(void*);
typedef uintptr_t (*LFL_t)(uintptr_t);
typedef void (*vEv_t)(void);
typedef void (*vEp_t)(void*);
typedef int32_t (*iEv_t)(void);
typedef int32_t (*iEi_t)(int32_t);
typedef int32_t (*iEL_t)(uintptr_t);
typedef int32_t (*iEp_t)(void*);
typedef int32_t (*iEO_t)(int32_t);
typedef uint32_t (*uEp_t)(void*);
typedef uint32_t (*uES_t)(void*);
typedef uint64_t (*UEp_t)(void*);
typedef intptr_t (*lEi_t)(int32_t);
typedef intptr_t (*lEp_t)(void*);
typedef intptr_t (*lEV_t)(...);
typedef intptr_t (*lES_t)(void*);
typedef uintptr_t (*LEL_t)(uintptr_t);
typedef void* (*pEv_t)(void);
typedef void* (*pFv_t)(void);
typedef void* (*pFu_t)(uint32_t);
typedef void* (*pFL_t)(uintptr_t);
typedef void* (*pEu_t)(uint32_t);
typedef void* (*pEL_t)(uintptr_t);
typedef void* (*pFp_t)(void*);
typedef void* (*pFS_t)(void*);
typedef int32_t (*iFbp__t)(struct_p_t*);
typedef void* (*pFriiiiiiiiilt__t)(struct_iiiiiiiiilt_t*);
typedef void (*vFip_t)(int32_t, void*);
typedef void (*vFpi_t)(void*, int32_t);
typedef void (*vFpu_t)(void*, uint32_t);
typedef void (*vFpp_t)(void*, void*);
typedef int32_t (*iFip_t)(int32_t, void*);
typedef int32_t (*iFup_t)(uint32_t, void*);
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 (*iFpV_t)(void*, ...);
typedef int64_t (*IFII_t)(int64_t, int64_t);
typedef uint64_t (*UFUU_t)(uint64_t, uint64_t);
typedef void* (*pFip_t)(int32_t, void*);
typedef void* (*pFLL_t)(uintptr_t, uintptr_t);
typedef void* (*pFpi_t)(void*, int32_t);
typedef void* (*pFpp_t)(void*, void*);
typedef void* (*SFpp_t)(void*, void*);
typedef int32_t (*iFrLL_BLL__t)(struct_LL_t*, struct_LL_t*);
typedef void (*vFipp_t)(int32_t, void*, void*);
typedef void (*vFipV_t)(int32_t, void*, ...);
typedef void (*vFpup_t)(void*, uint32_t, void*);
typedef void (*vFppu_t)(void*, void*, uint32_t);
typedef int32_t (*iFvpp_t)(void, void*, void*);
typedef int32_t (*iFvpV_t)(void, void*, ...);
typedef int32_t (*iFiip_t)(int32_t, int32_t, void*);
typedef int32_t (*iFiiN_t)(int32_t, int32_t, ...);
typedef int32_t (*iFipp_t)(int32_t, void*, void*);
typedef int32_t (*iFpii_t)(void*, int32_t, int32_t);
typedef int32_t (*iFpLi_t)(void*, uintptr_t, int32_t);
typedef int32_t (*iFppi_t)(void*, void*, int32_t);
typedef int32_t (*iFppp_t)(void*, void*, void*);
typedef int32_t (*iFppV_t)(void*, void*, ...);
typedef int32_t (*iFpON_t)(void*, int32_t, ...);
typedef int32_t (*iFSpp_t)(void*, void*, void*);
typedef int32_t (*iFSpV_t)(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 (*lFppL_t)(void*, void*, uintptr_t);
typedef void* (*pFpii_t)(void*, int32_t, int32_t);
typedef void* (*pFpII_t)(void*, int64_t, int64_t);
typedef void* (*pFppv_t)(void*, void*, void);
typedef double (*KFpBp_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 (*vFiipV_t)(int32_t, int32_t, void*, ...);
typedef void (*vFpLLp_t)(void*, uintptr_t, uintptr_t, void*);
typedef void (*vFppiV_t)(void*, void*, int32_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 (*iFippi_t)(int32_t, void*, void*, int32_t);
typedef int32_t (*iFippL_t)(int32_t, void*, void*, uintptr_t);
typedef int32_t (*iFpipp_t)(void*, int32_t, void*, void*);
typedef int32_t (*iFpLpp_t)(void*, uintptr_t, void*, void*);
typedef int32_t (*iFpLpV_t)(void*, uintptr_t, void*, ...);
typedef int32_t (*iFpppp_t)(void*, void*, void*, void*);
typedef int32_t (*iFSvpp_t)(void*, void, void*, void*);
typedef int32_t (*iFSvpV_t)(void*, void, void*, ...);
typedef uint32_t (*uFippu_t)(int32_t, void*, void*, uint32_t);
typedef uintptr_t (*LFpBp_iv_t)(void*, struct_p_t*, int32_t, void);
typedef int32_t (*iFiippi_t)(int32_t, int32_t, void*, void*, int32_t);
typedef int32_t (*iFipppp_t)(int32_t, void*, void*, void*, void*);
typedef int32_t (*iFuppLp_t)(uint32_t, void*, void*, uintptr_t, void*);
typedef int32_t (*iFpvvpV_t)(void*, void, void, void*, ...);
typedef int32_t (*iFpiLpp_t)(void*, int32_t, uintptr_t, void*, void*);
typedef int32_t (*iFpipOi_t)(void*, int32_t, void*, int32_t, int32_t);
typedef int32_t (*iFppupi_t)(void*, void*, uint32_t, void*, int32_t);
typedef int32_t (*iFpppLp_t)(void*, void*, void*, uintptr_t, void*);
typedef void* (*pFpLLiN_t)(void*, uintptr_t, uintptr_t, int32_t, ...);
typedef void* (*pFppLLp_t)(void*, void*, uintptr_t, uintptr_t, void*);
typedef int32_t (*iFpLvvpp_t)(void*, uintptr_t, void, void, void*, void*);
typedef int32_t (*iFpLiipV_t)(void*, uintptr_t, int32_t, int32_t, void*, ...);
typedef int32_t (*iFpLiLpV_t)(void*, uintptr_t, int32_t, uintptr_t, void*, ...);
typedef void* (*pEp_t)(void*);
typedef void* (*pES_t)(void*);
typedef int32_t (*iEbp__t)(struct_p_t*);
typedef void* (*pEriiiiiiiiilt__t)(struct_iiiiiiiiilt_t*);
typedef void (*vEip_t)(int32_t, void*);
typedef void (*vEpi_t)(void*, int32_t);
typedef void (*vEpu_t)(void*, uint32_t);
typedef void (*vEpp_t)(void*, void*);
typedef int32_t (*iEip_t)(int32_t, void*);
typedef int32_t (*iEup_t)(uint32_t, void*);
typedef int32_t (*iEpi_t)(void*, int32_t);
typedef int32_t (*iEpL_t)(void*, uintptr_t);
typedef int32_t (*iEpp_t)(void*, void*);
typedef int32_t (*iEpV_t)(void*, ...);
typedef int64_t (*IEII_t)(int64_t, int64_t);
typedef uint64_t (*UEUU_t)(uint64_t, uint64_t);
typedef void* (*pEip_t)(int32_t, void*);
typedef void* (*pELL_t)(uintptr_t, uintptr_t);
typedef void* (*pEpi_t)(void*, int32_t);
typedef void* (*pEpp_t)(void*, void*);
typedef void* (*SEpp_t)(void*, void*);
typedef int32_t (*iErLL_BLL__t)(struct_LL_t*, struct_LL_t*);
typedef void (*vEipp_t)(int32_t, void*, void*);
typedef void (*vEipV_t)(int32_t, void*, ...);
typedef void (*vEpup_t)(void*, uint32_t, void*);
typedef void (*vEppu_t)(void*, void*, uint32_t);
typedef int32_t (*iEvpp_t)(void, void*, void*);
typedef int32_t (*iEvpV_t)(void, void*, ...);
typedef int32_t (*iEiip_t)(int32_t, int32_t, void*);
typedef int32_t (*iEiiN_t)(int32_t, int32_t, ...);
typedef int32_t (*iEipp_t)(int32_t, void*, void*);
typedef int32_t (*iEpii_t)(void*, int32_t, int32_t);
typedef int32_t (*iEpLi_t)(void*, uintptr_t, int32_t);
typedef int32_t (*iEppi_t)(void*, void*, int32_t);
typedef int32_t (*iEppp_t)(void*, void*, void*);
typedef int32_t (*iEppV_t)(void*, void*, ...);
typedef int32_t (*iEpON_t)(void*, int32_t, ...);
typedef int32_t (*iESpp_t)(void*, void*, void*);
typedef int32_t (*iESpV_t)(void*, void*, ...);
typedef intptr_t (*lEipi_t)(int32_t, void*, int32_t);
typedef intptr_t (*lEipL_t)(int32_t, void*, uintptr_t);
typedef intptr_t (*lEppL_t)(void*, void*, uintptr_t);
typedef void* (*pEpii_t)(void*, int32_t, int32_t);
typedef void* (*pEpII_t)(void*, int64_t, int64_t);
typedef void* (*pEpLL_t)(void*, uintptr_t, uintptr_t);
typedef void* (*pEppv_t)(void*, void*, void);
typedef double (*KEpBp_a_t)(void*, struct_p_t*, void*);
typedef intptr_t (*lEpBp_i_t)(void*, struct_p_t*, int32_t);
typedef uintptr_t (*LEpBp_i_t)(void*, struct_p_t*, int32_t);
typedef void (*vEiipp_t)(int32_t, int32_t, void*, void*);
typedef void (*vEiipV_t)(int32_t, int32_t, void*, ...);
typedef void (*vEpLLp_t)(void*, uintptr_t, uintptr_t, void*);
typedef void (*vEppiV_t)(void*, void*, int32_t, ...);
typedef int32_t (*iEivpV_t)(int32_t, void, void*, ...);
typedef int32_t (*iEiiip_t)(int32_t, int32_t, int32_t, void*);
typedef int32_t (*iEipii_t)(int32_t, void*, int32_t, int32_t);
typedef int32_t (*iEippi_t)(int32_t, void*, void*, int32_t);
typedef int32_t (*iEippL_t)(int32_t, void*, void*, uintptr_t);
typedef int32_t (*iEpipp_t)(void*, int32_t, void*, void*);
typedef int32_t (*iEpipV_t)(void*, int32_t, void*, ...);
typedef int32_t (*iEpLpp_t)(void*, uintptr_t, void*, void*);
typedef int32_t (*iEpLpV_t)(void*, uintptr_t, void*, ...);
typedef int32_t (*iEpppp_t)(void*, void*, void*, void*);
typedef int32_t (*iESvpp_t)(void*, void, void*, void*);
typedef int32_t (*iESvpV_t)(void*, void, void*, ...);
typedef uint32_t (*uEippu_t)(int32_t, void*, void*, uint32_t);
typedef uintptr_t (*LEpBp_iv_t)(void*, struct_p_t*, int32_t, void);
typedef int32_t (*iEiippi_t)(int32_t, int32_t, void*, void*, int32_t);
typedef int32_t (*iEipppp_t)(int32_t, void*, void*, void*, void*);
typedef int32_t (*iEuppLp_t)(uint32_t, void*, void*, uintptr_t, void*);
typedef int32_t (*iEpvvpV_t)(void*, void, void, void*, ...);
typedef int32_t (*iEpiLpp_t)(void*, int32_t, uintptr_t, void*, void*);
typedef int32_t (*iEpipOi_t)(void*, int32_t, void*, int32_t, int32_t);
typedef int32_t (*iEppupi_t)(void*, void*, uint32_t, void*, int32_t);
typedef int32_t (*iEpppLp_t)(void*, void*, void*, uintptr_t, void*);
typedef void* (*pEpLLiN_t)(void*, uintptr_t, uintptr_t, int32_t, ...);
typedef void* (*pEppLLp_t)(void*, void*, uintptr_t, uintptr_t, void*);
typedef int32_t (*iEpLvvpp_t)(void*, uintptr_t, void, void, void*, void*);
typedef int32_t (*iEpLiipV_t)(void*, uintptr_t, int32_t, int32_t, void*, ...);
typedef int32_t (*iEpLiLpV_t)(void*, uintptr_t, int32_t, uintptr_t, void*, ...);
typedef int32_t (*iFpppupp_t)(void*, void*, void*, uint32_t, void*, void*);
typedef int32_t (*iFpppppp_t)(void*, void*, void*, void*, void*, void*);
typedef intptr_t (*lFipLpLL_t)(int32_t, void*, uintptr_t, void*, uintptr_t, uintptr_t);
typedef void* (*pFpLiiiI_t)(void*, uintptr_t, int32_t, int32_t, int32_t, int64_t);
typedef void* (*pFpLiiil_t)(void*, uintptr_t, int32_t, int32_t, int32_t, intptr_t);
typedef int32_t (*iFpippppp_t)(void*, int32_t, void*, void*, void*, void*, void*);
typedef int32_t (*iFpLiLppp_t)(void*, uintptr_t, int32_t, uintptr_t, void*, void*, void*);
typedef int32_t (*iEpppppp_t)(void*, void*, void*, void*, void*, void*);
typedef intptr_t (*lEipLpLL_t)(int32_t, void*, uintptr_t, void*, uintptr_t, uintptr_t);
typedef void* (*pEpLiiiI_t)(void*, uintptr_t, int32_t, int32_t, int32_t, int64_t);
typedef void* (*pEpLiiil_t)(void*, uintptr_t, int32_t, int32_t, int32_t, intptr_t);
typedef int32_t (*iEpippppp_t)(void*, int32_t, void*, void*, void*, void*, void*);
typedef int32_t (*iEpLiLppp_t)(void*, uintptr_t, int32_t, uintptr_t, void*, void*, void*);
#define SUPER() ADDED_FUNCTIONS() \
GO(freeaddrinfo, vFp_t) \
GO(regfree, vFp_t) \
GO(__close_nocancel, iFi_t) \
GO(posix_spawn_file_actions_destroy, iFp_t) \
GO(posix_spawn_file_actions_init, iFp_t) \
GO(sysinfo, iFp_t) \
GO(getwc, uFS_t) \
GO(__sysconf, lFi_t) \
GO(sysconf, lFi_t) \
GO(atol, lFp_t) \
GO(ftell, lFS_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(freeaddrinfo, vEp_t) \
GO(regfree, vEp_t) \
GO(__close_nocancel, iEi_t) \
GO(posix_spawn_file_actions_destroy, iEp_t) \
GO(posix_spawn_file_actions_init, iEp_t) \
GO(sysinfo, iEp_t) \
GO(getwc, uES_t) \
GO(__sysconf, lEi_t) \
GO(sysconf, lEi_t) \
GO(atol, lEp_t) \
GO(ftell, lES_t) \
GO(__ctype_b_loc, pEv_t) \
GO(__ctype_tolower_loc, pEv_t) \
GO(__ctype_toupper_loc, pEv_t) \
GO(__errno_location, pEv_t) \
GO(localeconv, pEv_t) \
GO(__h_errno_location, pFv_t) \
GO(localeconv, pFv_t) \
GO(getpwuid, pFu_t) \
GO(getpwuid, pEu_t) \
GO(gethostbyname, pFp_t) \
GO(getprotobyname, pFp_t) \
GO(getpwnam, pFp_t) \
GO(gmtime, pFp_t) \
GO(localtime, pFp_t) \
GO(getmntent, pFS_t) \
GO(getifaddrs, iFbp__t) \
GO(asctime, pFriiiiiiiiilt__t) \
GO(futimens, iFip_t) \
GO(futimes, iFip_t) \
GO(getrlimit, iFup_t) \
GO(setrlimit, iFup_t) \
GO(backtrace, iFpi_t) \
GO(posix_spawn_file_actions_addclose, iFpi_t) \
GO(alphasort64, iFpp_t) \
GO(execvp, iFpp_t) \
GO(statvfs, iFpp_t) \
GO(statvfs64, iFpp_t) \
GO(utimes, iFpp_t) \
GO(execl, iFpV_t) \
GO(execlp, iFpV_t) \
GO(signal, pFip_t) \
GO(aligned_alloc, pFLL_t) \
GO(backtrace_symbols, pFpi_t) \
GO(__cmsg_nxthdr, pFpp_t) \
GO(__gmtime_r, pFpp_t) \
GO(gmtime_r, pFpp_t) \
GO(localtime_r, pFpp_t) \
GO(vsyslog, vFipp_t) \
GO(_ITM_addUserCommitAction, vFpup_t) \
GO(posix_spawn_file_actions_adddup2, iFpii_t) \
GO(regcomp, iFppi_t) \
GO(vswscanf, iFppp_t) \
GO(__isoc99_fscanf, iFppV_t) \
GO(swscanf, iFppV_t) \
GO(fscanf, iFSpV_t) \
GO(recvmsg, lFipi_t) \
GO(sendmsg, lFipi_t) \
GO(writev, lFipi_t) \
GO(__realpath_chk, pFppv_t) \
GO(__strtold_l, KFpBp_a_t) \
GO(strtold_l, KFpBp_a_t) \
GO(wcstol, lFpBp_i_t) \
GO(wcstoul, LFpBp_i_t) \
GO(__syslog_chk, vFiipV_t) \
GO(utimensat, iFippi_t) \
GO(readlinkat, iFippL_t) \
GO(getaddrinfo, iFpppp_t) \
GO(regerror, uFippu_t) \
GO(getopt_long, iFipppp_t) \
GO(getgrgid_r, iFuppLp_t) \
GO(getpwuid_r, iFuppLp_t) \
GO(posix_spawn_file_actions_addopen, iFpipOi_t) \
GO(regexec, iFppupi_t) \
GO(getgrnam_r, iFpppLp_t) \
GO(getpwnam_r, iFpppLp_t) \
GO(getprotobyname, pEp_t) \
GO(getpwnam, pEp_t) \
GO(gmtime, pEp_t) \
GO(localtime, pEp_t) \
GO(getmntent, pES_t) \
GO(getifaddrs, iEbp__t) \
GO(asctime, pEriiiiiiiiilt__t) \
GO(futimens, iEip_t) \
GO(futimes, iEip_t) \
GO(getrlimit, iEup_t) \
GO(setrlimit, iEup_t) \
GO(backtrace, iEpi_t) \
GO(posix_spawn_file_actions_addclose, iEpi_t) \
GO(alphasort64, iEpp_t) \
GO(execvp, iEpp_t) \
GO(statvfs, iEpp_t) \
GO(statvfs64, iEpp_t) \
GO(utimes, iEpp_t) \
GO(execl, iEpV_t) \
GO(execlp, iEpV_t) \
GO(signal, pEip_t) \
GO(aligned_alloc, pELL_t) \
GO(backtrace_symbols, pEpi_t) \
GO(__cmsg_nxthdr, pEpp_t) \
GO(__gmtime_r, pEpp_t) \
GO(gmtime_r, pEpp_t) \
GO(localtime_r, pEpp_t) \
GO(vsyslog, vEipp_t) \
GO(_ITM_addUserCommitAction, vEpup_t) \
GO(posix_spawn_file_actions_adddup2, iEpii_t) \
GO(regcomp, iEppi_t) \
GO(execvpe, iEppp_t) \
GO(vswscanf, iEppp_t) \
GO(__isoc99_fscanf, iEppV_t) \
GO(swscanf, iEppV_t) \
GO(fscanf, iESpV_t) \
GO(readv, lEipi_t) \
GO(recvmsg, lEipi_t) \
GO(sendmsg, lEipi_t) \
GO(writev, lEipi_t) \
GO(__realpath_chk, pEppv_t) \
GO(__strtold_l, KEpBp_a_t) \
GO(strtold_l, KEpBp_a_t) \
GO(wcstol, lEpBp_i_t) \
GO(wcstoul, LEpBp_i_t) \
GO(__vsyslog_chk, vEiipp_t) \
GO(__syslog_chk, vEiipV_t) \
GO(utimensat, iEippi_t) \
GO(readlinkat, iEippL_t) \
GO(getaddrinfo, iEpppp_t) \
GO(regerror, uEippu_t) \
GO(getopt_long, iEipppp_t) \
GO(getgrgid_r, iEuppLp_t) \
GO(getpwuid_r, iEuppLp_t) \
GO(posix_spawn_file_actions_addopen, iEpipOi_t) \
GO(regexec, iEppupi_t) \
GO(getgrnam_r, iEpppLp_t) \
GO(getpwnam_r, iEpppLp_t) \
GO(gethostbyname_r, iFpppupp_t) \
GO(posix_spawn, iFpppppp_t) \
GO(process_vm_readv, lFipLpLL_t) \
GO(process_vm_writev, lFipLpLL_t)
GO(posix_spawn, iEpppppp_t) \
GO(process_vm_readv, lEipLpLL_t) \
GO(process_vm_writev, lEipLpLL_t)
#endif // __wrappedlibcTYPES32_H_

View File

@ -11,26 +11,26 @@
#define ADDED_FUNCTIONS()
#endif
typedef int32_t (*iFp_t)(void*);
typedef void* (*pFv_t)(void);
typedef int32_t (*iFpp_t)(void*, void*);
typedef void* (*pFpi_t)(void*, int32_t);
typedef void* (*pFpp_t)(void*, void*);
typedef int32_t (*iFpip_t)(void*, int32_t, void*);
typedef void* (*pFppi_t)(void*, void*, int32_t);
typedef void* (*pFppp_t)(void*, void*, void*);
typedef int32_t (*iFpppi_t)(void*, void*, void*, int32_t);
typedef int32_t (*iEp_t)(void*);
typedef void* (*pEv_t)(void);
typedef int32_t (*iEpp_t)(void*, void*);
typedef void* (*pEpi_t)(void*, int32_t);
typedef void* (*pEpp_t)(void*, void*);
typedef int32_t (*iEpip_t)(void*, int32_t, void*);
typedef void* (*pEppi_t)(void*, void*, int32_t);
typedef void* (*pEppp_t)(void*, void*, void*);
typedef int32_t (*iEpppi_t)(void*, void*, void*, int32_t);
#define SUPER() ADDED_FUNCTIONS() \
GO(dlclose, iFp_t) \
GO(dlerror, pFv_t) \
GO(_dl_find_object, iFpp_t) \
GO(dladdr, iFpp_t) \
GO(dlopen, pFpi_t) \
GO(dlsym, pFpp_t) \
GO(dlinfo, iFpip_t) \
GO(dlmopen, pFppi_t) \
GO(dlvsym, pFppp_t) \
GO(dladdr1, iFpppi_t)
GO(dlclose, iEp_t) \
GO(dlerror, pEv_t) \
GO(_dl_find_object, iEpp_t) \
GO(dladdr, iEpp_t) \
GO(dlopen, pEpi_t) \
GO(dlsym, pEpp_t) \
GO(dlinfo, iEpip_t) \
GO(dlmopen, pEppi_t) \
GO(dlvsym, pEppp_t) \
GO(dladdr1, iEpppi_t)
#endif // __wrappedlibdlTYPES32_H_

View File

@ -11,80 +11,80 @@
#define ADDED_FUNCTIONS()
#endif
typedef uint64_t (*UFs_t)(void*);
typedef float (*fFf_t)(float);
typedef double (*dFd_t)(double);
typedef long double (*DFD_t)(long double);
typedef double (*KFK_t)(double);
typedef float (*fFff_t)(float, float);
typedef double (*dFdd_t)(double, double);
typedef double (*KFKK_t)(double, double);
typedef double (*KFKp_t)(double, void*);
typedef uint64_t (*UFsvvs_t)(void*, void, void, void*);
typedef uint64_t (*UEs_t)(void*);
typedef float (*fEf_t)(float);
typedef double (*dEd_t)(double);
typedef long double (*DED_t)(long double);
typedef double (*KEK_t)(double);
typedef float (*fEff_t)(float, float);
typedef double (*dEdd_t)(double, double);
typedef double (*KEKK_t)(double, double);
typedef double (*KEKp_t)(double, void*);
typedef uint64_t (*UEsvvs_t)(void*, void, void, void*);
#define SUPER() ADDED_FUNCTIONS() \
GO(cacosf, UFs_t) \
GO(cacoshf, UFs_t) \
GO(casinf, UFs_t) \
GO(casinhf, UFs_t) \
GO(catanf, UFs_t) \
GO(catanhf, UFs_t) \
GO(ccosf, UFs_t) \
GO(ccoshf, UFs_t) \
GO(cexpf, UFs_t) \
GO(clogf, UFs_t) \
GO(cprojf, UFs_t) \
GO(csinf, UFs_t) \
GO(csinhf, UFs_t) \
GO(csqrtf, UFs_t) \
GO(ctanf, UFs_t) \
GO(ctanhf, UFs_t) \
GO(__acosf_finite, fFf_t) \
GO(__acoshf_finite, fFf_t) \
GO(__asinf_finite, fFf_t) \
GO(__coshf_finite, fFf_t) \
GO(__exp2f_finite, fFf_t) \
GO(__expf_finite, fFf_t) \
GO(__log10f_finite, fFf_t) \
GO(__log2f_finite, fFf_t) \
GO(__logf_finite, fFf_t) \
GO(__sinhf_finite, fFf_t) \
GO(__sqrtf_finite, fFf_t) \
GO(__acos_finite, dFd_t) \
GO(__acosh_finite, dFd_t) \
GO(__asin_finite, dFd_t) \
GO(__cosh_finite, dFd_t) \
GO(__exp2_finite, dFd_t) \
GO(__exp_finite, dFd_t) \
GO(__log10_finite, dFd_t) \
GO(__log2_finite, dFd_t) \
GO(__log_finite, dFd_t) \
GO(__sinh_finite, dFd_t) \
GO(__sqrt_finite, dFd_t) \
GO(pow10l, DFD_t) \
GO(acoshl, KFK_t) \
GO(acosl, KFK_t) \
GO(asinhl, KFK_t) \
GO(asinl, KFK_t) \
GO(atanhl, KFK_t) \
GO(cbrtl, KFK_t) \
GO(erfcl, KFK_t) \
GO(erfl, KFK_t) \
GO(ldexpl, KFK_t) \
GO(lgammal, KFK_t) \
GO(logl, KFK_t) \
GO(pow10l, KFK_t) \
GO(tgammal, KFK_t) \
GO(__atan2f_finite, fFff_t) \
GO(__hypotf_finite, fFff_t) \
GO(__powf_finite, fFff_t) \
GO(__atan2_finite, dFdd_t) \
GO(__hypot_finite, dFdd_t) \
GO(__pow_finite, dFdd_t) \
GO(fmodl, KFKK_t) \
GO(powl, KFKK_t) \
GO(frexpl, KFKp_t) \
GO(lgammal_r, KFKp_t) \
GO(cpowf, UFsvvs_t)
GO(cacosf, UEs_t) \
GO(cacoshf, UEs_t) \
GO(casinf, UEs_t) \
GO(casinhf, UEs_t) \
GO(catanf, UEs_t) \
GO(catanhf, UEs_t) \
GO(ccosf, UEs_t) \
GO(ccoshf, UEs_t) \
GO(cexpf, UEs_t) \
GO(clogf, UEs_t) \
GO(cprojf, UEs_t) \
GO(csinf, UEs_t) \
GO(csinhf, UEs_t) \
GO(csqrtf, UEs_t) \
GO(ctanf, UEs_t) \
GO(ctanhf, UEs_t) \
GO(__acosf_finite, fEf_t) \
GO(__acoshf_finite, fEf_t) \
GO(__asinf_finite, fEf_t) \
GO(__coshf_finite, fEf_t) \
GO(__exp2f_finite, fEf_t) \
GO(__expf_finite, fEf_t) \
GO(__log10f_finite, fEf_t) \
GO(__log2f_finite, fEf_t) \
GO(__logf_finite, fEf_t) \
GO(__sinhf_finite, fEf_t) \
GO(__sqrtf_finite, fEf_t) \
GO(__acos_finite, dEd_t) \
GO(__acosh_finite, dEd_t) \
GO(__asin_finite, dEd_t) \
GO(__cosh_finite, dEd_t) \
GO(__exp2_finite, dEd_t) \
GO(__exp_finite, dEd_t) \
GO(__log10_finite, dEd_t) \
GO(__log2_finite, dEd_t) \
GO(__log_finite, dEd_t) \
GO(__sinh_finite, dEd_t) \
GO(__sqrt_finite, dEd_t) \
GO(pow10l, DED_t) \
GO(acoshl, KEK_t) \
GO(acosl, KEK_t) \
GO(asinhl, KEK_t) \
GO(asinl, KEK_t) \
GO(atanhl, KEK_t) \
GO(cbrtl, KEK_t) \
GO(erfcl, KEK_t) \
GO(erfl, KEK_t) \
GO(ldexpl, KEK_t) \
GO(lgammal, KEK_t) \
GO(logl, KEK_t) \
GO(pow10l, KEK_t) \
GO(tgammal, KEK_t) \
GO(__atan2f_finite, fEff_t) \
GO(__hypotf_finite, fEff_t) \
GO(__powf_finite, fEff_t) \
GO(__atan2_finite, dEdd_t) \
GO(__hypot_finite, dEdd_t) \
GO(__pow_finite, dEdd_t) \
GO(fmodl, KEKK_t) \
GO(powl, KEKK_t) \
GO(frexpl, KEKp_t) \
GO(lgammal_r, KEKp_t) \
GO(cpowf, UEsvvs_t)
#endif // __wrappedlibmTYPES32_H_

View File

@ -11,108 +11,108 @@
#define ADDED_FUNCTIONS()
#endif
typedef void (*vFv_t)(void);
typedef void (*vFp_t)(void*);
typedef int32_t (*iFp_t)(void*);
typedef int32_t (*iFh_t)(uintptr_t);
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 int32_t (*iFhp_t)(uintptr_t, void*);
typedef int32_t (*iFprLL__t)(void*, struct_LL_t*);
typedef void (*vFppp_t)(void*, void*, void*);
typedef int32_t (*iFpiu_t)(void*, int32_t, uint32_t);
typedef int32_t (*iFpup_t)(void*, uint32_t, void*);
typedef int32_t (*iFppL_t)(void*, void*, uintptr_t);
typedef int32_t (*iFppp_t)(void*, void*, void*);
typedef int32_t (*iFhup_t)(uintptr_t, uint32_t, void*);
typedef void* (*pFpOM_t)(void*, int32_t, ...);
typedef int32_t (*iFpprLL__t)(void*, void*, struct_LL_t*);
typedef int32_t (*iFBh_ppp_t)(struct_h_t*, void*, void*, void*);
typedef void (*vEv_t)(void);
typedef void (*vEp_t)(void*);
typedef int32_t (*iEp_t)(void*);
typedef int32_t (*iEh_t)(uintptr_t);
typedef void (*vEpi_t)(void*, int32_t);
typedef int32_t (*iEpi_t)(void*, int32_t);
typedef int32_t (*iEpL_t)(void*, uintptr_t);
typedef int32_t (*iEpp_t)(void*, void*);
typedef int32_t (*iEhi_t)(uintptr_t, int32_t);
typedef int32_t (*iEhp_t)(uintptr_t, void*);
typedef int32_t (*iEprLL__t)(void*, struct_LL_t*);
typedef void (*vEppp_t)(void*, void*, void*);
typedef int32_t (*iEpiu_t)(void*, int32_t, uint32_t);
typedef int32_t (*iEpup_t)(void*, uint32_t, void*);
typedef int32_t (*iEppL_t)(void*, void*, uintptr_t);
typedef int32_t (*iEppp_t)(void*, void*, void*);
typedef int32_t (*iEhup_t)(uintptr_t, uint32_t, void*);
typedef void* (*pEpOM_t)(void*, int32_t, ...);
typedef int32_t (*iEpprLL__t)(void*, void*, struct_LL_t*);
typedef int32_t (*iEBh_ppp_t)(struct_h_t*, void*, void*, void*);
#define SUPER() ADDED_FUNCTIONS() \
GO(__pthread_initialize, vFv_t) \
GO(__pthread_register_cancel, vFp_t) \
GO(__pthread_unregister_cancel, vFp_t) \
GO(__pthread_unwind_next, vFp_t) \
GO(__pthread_mutex_destroy, iFp_t) \
GO(__pthread_mutex_lock, iFp_t) \
GO(__pthread_mutex_trylock, iFp_t) \
GO(__pthread_mutex_unlock, iFp_t) \
GO(__pthread_mutexattr_init, iFp_t) \
GO(pthread_attr_destroy, iFp_t) \
GO(pthread_attr_init, iFp_t) \
GO(pthread_cond_broadcast, iFp_t) \
GO(pthread_cond_broadcast@GLIBC_2.0, iFp_t) \
GO(pthread_cond_destroy, iFp_t) \
GO(pthread_cond_destroy@GLIBC_2.0, iFp_t) \
GO(pthread_cond_signal, iFp_t) \
GO(pthread_cond_signal@GLIBC_2.0, iFp_t) \
GO(pthread_mutex_destroy, iFp_t) \
GO(pthread_mutex_lock, iFp_t) \
GO(pthread_mutex_trylock, iFp_t) \
GO(pthread_mutex_unlock, iFp_t) \
GO(pthread_mutexattr_init, iFp_t) \
GO(pthread_rwlock_destroy, iFp_t) \
GO(pthread_rwlock_unlock, iFp_t) \
GO(pthread_rwlock_wrlock, iFp_t) \
GO(sem_close, iFp_t) \
GO(sem_destroy, iFp_t) \
GO(sem_post, iFp_t) \
GO(sem_trywait, iFp_t) \
GO(sem_wait, iFp_t) \
GO(pthread_detach, iFh_t) \
GO(_pthread_cleanup_pop, vFpi_t) \
GO(_pthread_cleanup_pop_restore, vFpi_t) \
GO(pthread_attr_setdetachstate, iFpi_t) \
GO(pthread_attr_setinheritsched, iFpi_t) \
GO(pthread_attr_setschedpolicy, iFpi_t) \
GO(pthread_attr_setscope, iFpi_t) \
GO(pthread_mutexattr_setkind_np, iFpi_t) \
GO(pthread_attr_setguardsize, iFpL_t) \
GO(pthread_attr_setstacksize, iFpL_t) \
GO(__pthread_key_create, iFpp_t) \
GO(__pthread_mutex_init, iFpp_t) \
GO(__pthread_once, iFpp_t) \
GO(__pthread_rwlock_init, iFpp_t) \
GO(pthread_attr_getdetachstate, iFpp_t) \
GO(pthread_attr_getguardsize, iFpp_t) \
GO(pthread_attr_getinheritsched, iFpp_t) \
GO(pthread_attr_getschedparam, iFpp_t) \
GO(pthread_attr_getschedpolicy, iFpp_t) \
GO(pthread_attr_getscope, iFpp_t) \
GO(pthread_attr_getstackaddr, iFpp_t) \
GO(pthread_attr_getstacksize, iFpp_t) \
GO(pthread_attr_setschedparam, iFpp_t) \
GO(pthread_attr_setstackaddr, iFpp_t) \
GO(pthread_cond_init, iFpp_t) \
GO(pthread_cond_init@GLIBC_2.0, iFpp_t) \
GO(pthread_cond_wait, iFpp_t) \
GO(pthread_cond_wait@GLIBC_2.0, iFpp_t) \
GO(pthread_key_create, iFpp_t) \
GO(pthread_mutex_init, iFpp_t) \
GO(pthread_mutex_timedlock, iFpp_t) \
GO(pthread_once, iFpp_t) \
GO(pthread_rwlock_init, iFpp_t) \
GO(sem_getvalue, iFpp_t) \
GO(pthread_kill@GLIBC_2.0, iFhi_t) \
GO(pthread_getattr_np, iFhp_t) \
GO(sem_timedwait, iFprLL__t) \
GO(_pthread_cleanup_push, vFppp_t) \
GO(_pthread_cleanup_push_defer, vFppp_t) \
GO(sem_init, iFpiu_t) \
GO(pthread_attr_setaffinity_np, iFpup_t) \
GO(pthread_attr_setstack, iFppL_t) \
GO(__pthread_atfork, iFppp_t) \
GO(pthread_atfork, iFppp_t) \
GO(pthread_attr_getstack, iFppp_t) \
GO(pthread_getaffinity_np, iFhup_t) \
GO(pthread_setaffinity_np, iFhup_t) \
GO(sem_open, pFpOM_t) \
GO(pthread_cond_timedwait, iFpprLL__t) \
GO(pthread_cond_timedwait@GLIBC_2.0, iFpprLL__t) \
GO(pthread_create, iFBh_ppp_t)
GO(__pthread_initialize, vEv_t) \
GO(__pthread_register_cancel, vEp_t) \
GO(__pthread_unregister_cancel, vEp_t) \
GO(__pthread_unwind_next, vEp_t) \
GO(__pthread_mutex_destroy, iEp_t) \
GO(__pthread_mutex_lock, iEp_t) \
GO(__pthread_mutex_trylock, iEp_t) \
GO(__pthread_mutex_unlock, iEp_t) \
GO(__pthread_mutexattr_init, iEp_t) \
GO(pthread_attr_destroy, iEp_t) \
GO(pthread_attr_init, iEp_t) \
GO(pthread_cond_broadcast, iEp_t) \
GO(pthread_cond_broadcast@GLIBC_2.0, iEp_t) \
GO(pthread_cond_destroy, iEp_t) \
GO(pthread_cond_destroy@GLIBC_2.0, iEp_t) \
GO(pthread_cond_signal, iEp_t) \
GO(pthread_cond_signal@GLIBC_2.0, iEp_t) \
GO(pthread_mutex_destroy, iEp_t) \
GO(pthread_mutex_lock, iEp_t) \
GO(pthread_mutex_trylock, iEp_t) \
GO(pthread_mutex_unlock, iEp_t) \
GO(pthread_mutexattr_init, iEp_t) \
GO(pthread_rwlock_destroy, iEp_t) \
GO(pthread_rwlock_unlock, iEp_t) \
GO(pthread_rwlock_wrlock, iEp_t) \
GO(sem_close, iEp_t) \
GO(sem_destroy, iEp_t) \
GO(sem_post, iEp_t) \
GO(sem_trywait, iEp_t) \
GO(sem_wait, iEp_t) \
GO(pthread_detach, iEh_t) \
GO(_pthread_cleanup_pop, vEpi_t) \
GO(_pthread_cleanup_pop_restore, vEpi_t) \
GO(pthread_attr_setdetachstate, iEpi_t) \
GO(pthread_attr_setinheritsched, iEpi_t) \
GO(pthread_attr_setschedpolicy, iEpi_t) \
GO(pthread_attr_setscope, iEpi_t) \
GO(pthread_mutexattr_setkind_np, iEpi_t) \
GO(pthread_attr_setguardsize, iEpL_t) \
GO(pthread_attr_setstacksize, iEpL_t) \
GO(__pthread_key_create, iEpp_t) \
GO(__pthread_mutex_init, iEpp_t) \
GO(__pthread_once, iEpp_t) \
GO(__pthread_rwlock_init, iEpp_t) \
GO(pthread_attr_getdetachstate, iEpp_t) \
GO(pthread_attr_getguardsize, iEpp_t) \
GO(pthread_attr_getinheritsched, iEpp_t) \
GO(pthread_attr_getschedparam, iEpp_t) \
GO(pthread_attr_getschedpolicy, iEpp_t) \
GO(pthread_attr_getscope, iEpp_t) \
GO(pthread_attr_getstackaddr, iEpp_t) \
GO(pthread_attr_getstacksize, iEpp_t) \
GO(pthread_attr_setschedparam, iEpp_t) \
GO(pthread_attr_setstackaddr, iEpp_t) \
GO(pthread_cond_init, iEpp_t) \
GO(pthread_cond_init@GLIBC_2.0, iEpp_t) \
GO(pthread_cond_wait, iEpp_t) \
GO(pthread_cond_wait@GLIBC_2.0, iEpp_t) \
GO(pthread_key_create, iEpp_t) \
GO(pthread_mutex_init, iEpp_t) \
GO(pthread_mutex_timedlock, iEpp_t) \
GO(pthread_once, iEpp_t) \
GO(pthread_rwlock_init, iEpp_t) \
GO(sem_getvalue, iEpp_t) \
GO(pthread_kill@GLIBC_2.0, iEhi_t) \
GO(pthread_getattr_np, iEhp_t) \
GO(sem_timedwait, iEprLL__t) \
GO(_pthread_cleanup_push, vEppp_t) \
GO(_pthread_cleanup_push_defer, vEppp_t) \
GO(sem_init, iEpiu_t) \
GO(pthread_attr_setaffinity_np, iEpup_t) \
GO(pthread_attr_setstack, iEppL_t) \
GO(__pthread_atfork, iEppp_t) \
GO(pthread_atfork, iEppp_t) \
GO(pthread_attr_getstack, iEppp_t) \
GO(pthread_getaffinity_np, iEhup_t) \
GO(pthread_setaffinity_np, iEhup_t) \
GO(sem_open, pEpOM_t) \
GO(pthread_cond_timedwait, iEpprLL__t) \
GO(pthread_cond_timedwait@GLIBC_2.0, iEpprLL__t) \
GO(pthread_create, iEBh_ppp_t)
#endif // __wrappedlibpthreadTYPES32_H_

View File

@ -11,9 +11,9 @@
#define ADDED_FUNCTIONS()
#endif
typedef int32_t (*iFuBLL__t)(uint32_t, struct_LL_t*);
typedef int32_t (*iEuBLL__t)(uint32_t, struct_LL_t*);
#define SUPER() ADDED_FUNCTIONS() \
GO(__clock_gettime, iFuBLL__t)
GO(__clock_gettime, iEuBLL__t)
#endif // __wrappedlibrtTYPES32_H_

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -704,6 +704,11 @@ EXPORT int my32_vsyslog(x64emu_t* emu, int priority, void* fmt, void* b) {
PREPARE_VALIST_32;
return vsyslog(priority, (const char*)fmt, VARARGS_32);
}
EXPORT int my32___vsyslog_chk(x64emu_t* emu, int priority, int flag, void* fmt, void* b) {
myStackAlign32((const char*)fmt, b, emu->scratch);
PREPARE_VALIST_32;
return vsyslog(priority, (const char*)fmt, VARARGS_32);
}
EXPORT int my32___syslog_chk(x64emu_t* emu, int priority, int flags, void* fmt, void* b) {
myStackAlign32((const char*)fmt, b, emu->scratch);
PREPARE_VALIST_32;
@ -918,20 +923,14 @@ EXPORT int my32___vasprintf_chk(x64emu_t* emu, void* strp, int flags, void* fmt,
int r = vasprintf(strp, fmt, VARARGS_32);
return r;
}
#if 0
EXPORT int my32___asprintf_chk(x64emu_t* emu, void* result_ptr, int flags, void* fmt, void* b)
{
#ifndef NOALIGN
myStackAlign32((const char*)fmt, b, emu->scratch);
PREPARE_VALIST_32;
void* f = vasprintf;
return ((iFppp_t)f)(result_ptr, fmt, VARARGS_32);
#else
return vasprintf((char**)result_ptr, (char*)fmt, b);
#endif
return vasprintf(result_ptr, fmt, VARARGS_32);
}
#endif
EXPORT int my32_vswprintf(x64emu_t* emu, void* buff, size_t s, void * fmt, uint32_t * b) {
// need to align on arm
myStackAlignW32((const char*)fmt, b, emu->scratch);
@ -1610,6 +1609,16 @@ EXPORT long my32_writev(x64emu_t* emu, int fd, struct i386_iovec* iov, int niov)
return writev(fd, vec, niov);
}
EXPORT long my32_readv(x64emu_t* emu, int fd, struct i386_iovec* iov, int niov)
{
struct iovec vec[niov];
for(int i=0; i<niov; ++i) {
vec[i].iov_base = from_ptrv(iov[i].iov_base);
vec[i].iov_len = from_ulong(iov[i].iov_len);
}
return readv(fd, vec, niov);
}
#if 0
EXPORT int my32_ftw64(x64emu_t* emu, void* filename, void* func, int descriptors)
@ -1716,7 +1725,7 @@ EXPORT int32_t my32_execvp(x64emu_t* emu, const char* path, ptr_t argv[])
int self = isProcSelf(fullpath, "exe");
int x86 = FileIsX86ELF(fullpath);
int x64 = FileIsX64ELF(fullpath);
printf_log(LOG_DEBUG, "execv(\"%s\", %p) is x86=%d\n", fullpath, argv, x86);
printf_log(LOG_DEBUG, "execvp(\"%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)
@ -1743,6 +1752,56 @@ EXPORT int32_t my32_execvp(x64emu_t* emu, const char* path, ptr_t argv[])
return execv(fullpath, (void*)newargv);
}
// execvp should use PATH to search for the program first
EXPORT int32_t my32_execvpe(x64emu_t* emu, const char* path, ptr_t argv[], ptr_t envp[])
{
// need to use BOX32_PATH / PATH here...
char* fullpath = ResolveFile(path, &my_context->box64_path);
// use fullpath now
int self = isProcSelf(fullpath, "exe");
int x86 = FileIsX86ELF(fullpath);
int x64 = FileIsX64ELF(fullpath);
char** newenvp = NULL;
// hack to update the environ var if needed
if(envp == from_ptrv(my_context->envv32) && environ)
newenvp = environ;
else {
int n=0;
while(envp[n]) ++n;
const char** newenvp = (const char**)calloc(n+1, sizeof(char*));
for(int i=0; i<=n; ++i)
newenvp[i+1] = from_ptrv(envp[i]);
}
printf_log(LOG_DEBUG, "execvpe(\"%s\", %p, %p) is x86=%d\n", fullpath, argv, envp, 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 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 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, " => execv(\"%s\", %p [\"%s\", \"%s\", \"%s\"...:%d], %p)\n", emu->context->box64path, newargv, newargv[0], n?newargv[1]:"", (n>1)?newargv[2]:"",n, newenvp);
int ret = execve(newargv[0], (char* const*)newargv, (char* const*)newenvp);
free(newargv);
free(newenvp);
return ret;
}
// 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] = from_ptrv(argv[i]);
int ret = execve(fullpath, (void*)newargv, (void*)newenvp);
free(newargv);
free(newenvp);
return ret;
}
typedef struct
{
int __allocated;
@ -2745,12 +2804,12 @@ EXPORT long my32_prlimit64(void* pid, uint32_t res, void* new_rlim, void* old_rl
{
return syscall(__NR_prlimit64, pid, res, new_rlim, old_rlim);
}
#endif
EXPORT void* my32_reallocarray(void* ptr, size_t nmemb, size_t size)
{
return realloc(ptr, nmemb*size);
}
#if 0
#ifndef __OPEN_NEEDS_MODE
# define __OPEN_NEEDS_MODE(oflag) \
(((oflag) & O_CREAT) != 0)
@ -3090,7 +3149,7 @@ EXPORT void* my32___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_err = errno;
//emu->libc_err = errno;
return &emu->libc_err;
}

File diff suppressed because it is too large Load Diff

View File

@ -2,14 +2,14 @@
#error Meh...
#endif
GOM(dladdr, iFEpp)
GOM(dladdr1, iFEpppi)
GO2(dlclose, iFEp, my_dlclose)
GO2(dlerror, pFEv, my_dlerror)
GOM(dladdr, iEEpp)
GOM(dladdr1, iEEpppi)
GO2(dlclose, iEEp, my_dlclose)
GO2(dlerror, pEEv, my_dlerror)
//DATAB(_dlfcn_hook, 4)
GOM(dlinfo, iFEpip)
GO2(dlmopen, pFEppi, my_dlmopen)
GO2(dlopen, pFEpi, my_dlopen)
GO2(dlsym, pFEpp, my_dlsym)
GO2(dlvsym, pFEppp, my_dlvsym) // Weak
GOM(_dl_find_object, iFEpp)
GOM(dlinfo, iEEpip)
GO2(dlmopen, pEEppi, my_dlmopen)
GO2(dlopen, pEEpi, my_dlopen)
GO2(dlsym, pEEpp, my_dlsym)
GO2(dlvsym, pEEppp, my_dlvsym) // Weak
GOM(_dl_find_object, iEEpp)

View File

@ -4,241 +4,241 @@
// Complex numbers are passed in as an address in the stack
GOW(acos, dFd)
GOW(acosf, fFf)
GOM(__acosf_finite, fFf) //%noE
GOM(__acos_finite, dFd) //%noE
GOW(acosh, dFd)
GOW(acoshf, fFf)
GOM(__acoshf_finite, fFf) //%noE
GOM(__acosh_finite, dFd) //%noE
GOW(acos, dEd)
GOW(acosf, fEf)
GOM(__acosf_finite, fEf) //%noE
GOM(__acos_finite, dEd) //%noE
GOW(acosh, dEd)
GOW(acoshf, fEf)
GOM(__acoshf_finite, fEf) //%noE
GOM(__acosh_finite, dEd) //%noE
#ifdef HAVE_LD80BITS
GOW(acoshl, DFD)
GOW(acoshl, DED)
#else
GOW2(acoshl, KFK, acosh)
GOW2(acoshl, KEK, acosh)
#endif
#ifdef HAVE_LD80BITS
GOW(acosl, DFD)
GOW(acosl, DED)
#else
GOW2(acosl, KFK, acos)
GOW2(acosl, KEK, acos)
#endif
GOW(asin, dFd)
GOW(asinf, fFf)
GOM(__asinf_finite, fFf) //%noE
GOM(__asin_finite, dFd) //%noE
GOW(asinh, dFd)
GOW(asinhf, fFf)
GOW(asin, dEd)
GOW(asinf, fEf)
GOM(__asinf_finite, fEf) //%noE
GOM(__asin_finite, dEd) //%noE
GOW(asinh, dEd)
GOW(asinhf, fEf)
#ifdef HAVE_LD80BITS
GOW(asinhl, DFD)
GOW(asinhl, DED)
#else
GOW2(asinhl, KFK, asinh)
GOW2(asinhl, KEK, asinh)
#endif
#ifdef HAVE_LD80BITS
GOW(asinl, DFD)
GOW(asinl, DED)
#else
GOW2(asinl, KFK, asin)
GOW2(asinl, KEK, asin)
#endif
GO(atan, dFd)
GOW(atan2, dFdd)
GOW(atan2f, fFff)
GOM(__atan2f_finite, fFff) //%noE
GOM(__atan2_finite, dFdd) //%noE
GO(atan, dEd)
GOW(atan2, dEdd)
GOW(atan2f, fEff)
GOM(__atan2f_finite, fEff) //%noE
GOM(__atan2_finite, dEdd) //%noE
// atan2l // Weak
GOW(atanf, fFf)
GOW(atanh, dFd)
GOW(atanhf, fFf)
GOW(atanf, fEf)
GOW(atanh, dEd)
GOW(atanhf, fEf)
// __atanhf_finite
// __atanh_finite
#ifdef HAVE_LD80BITS
GOW(atanhl, DFD)
GOW(atanhl, DED)
#else
GOW2(atanhl, KFK, atanh)
GOW2(atanhl, KEK, atanh)
#endif
// atanl // Weak
//GOW(cabs, dFdd) // only 1 arg, but is a double complex
GOW(cabsf, fFff) // only 1 arg, but is a float complex
//GOW(cabs, dEdd) // only 1 arg, but is a double complex
GOW(cabsf, fEff) // only 1 arg, but is a float complex
// cabsl // Weak
//GOWS(cacos, pFps) //%% complex
GOWM(cacosf, UFs) //%noE
//GOWS(cacosh, pFps) //%% complex
GOWM(cacoshf, UFs) //%noE
//GOWS(cacos, pEps) //%% complex
GOWM(cacosf, UEs) //%noE
//GOWS(cacosh, pEps) //%% complex
GOWM(cacoshf, UEs) //%noE
// cacoshl // Weak
// cacosl // Weak
//GOW(carg, dFdd) // 1arg, double complex
GOW(cargf, fFff) // 1arg, float complex
//GOW(carg, dEdd) // 1arg, double complex
GOW(cargf, fEff) // 1arg, float complex
// cargl // Weak
//GOWS(casin, pFps) //%% complex
GOWM(casinf, UFs) //%noE
//GOWS(casinh, pFps) //%% complex
GOWM(casinhf, UFs) //%noE
//GOWS(casin, pEps) //%% complex
GOWM(casinf, UEs) //%noE
//GOWS(casinh, pEps) //%% complex
GOWM(casinhf, UEs) //%noE
// casinhl // Weak
// casinl // Weak
//GOWS(catan, pFps) //%% complex
GOWM(catanf, UFs) //%noE
//GOWS(catanh, pFps) //%% complex
GOWM(catanhf, UFs) //%noE
//GOWS(catan, pEps) //%% complex
GOWM(catanf, UEs) //%noE
//GOWS(catanh, pEps) //%% complex
GOWM(catanhf, UEs) //%noE
// catanhl // Weak
// catanl // Weak
GOW(cbrt, dFd)
GOW(cbrtf, fFf)
GOW(cbrt, dEd)
GOW(cbrtf, fEf)
#ifdef HAVE_LD80BITS
GOW(cbrtl, DFD)
GOW(cbrtl, DED)
#else
GOW2(cbrtl, KFK, cbrt)
GOW2(cbrtl, KEK, cbrt)
#endif
//GOWS(ccos, pFps) //%% return complex
GOWM(ccosf, UFs) //%noE return complex
//GOWS(ccosh, pFps) //%% return complex
GOWM(ccoshf, UFs) //%noE return complex
//GOWS(ccos, pEps) //%% return complex
GOWM(ccosf, UEs) //%noE return complex
//GOWS(ccosh, pEps) //%% return complex
GOWM(ccoshf, UEs) //%noE return complex
// ccoshl // Weak
// ccosl // Weak
GOW(ceil, dFd)
GOW(ceilf, fFf)
GOW(ceil, dEd)
GOW(ceilf, fEf)
// ceill // Weak
//GOWS(cexp, pFps) //%% return complex
GOWM(cexpf, UFs) //%noE return complex
//GOWS(cexp, pEps) //%% return complex
GOWM(cexpf, UEs) //%noE return complex
// cexpl // Weak
// cimag // Weak
// cimagf // Weak
// cimagl // Weak
//GOS(clog, pFps) //%% return a double complex, so ret 4
//GOS(clog, pEps) //%% return a double complex, so ret 4
// clog10 // Weak
// __clog10
// clog10f // Weak
// __clog10f
// clog10l // Weak
// __clog10l
GOM(clogf, UFs) //%noE float complex doesn't trigger the ret 4, but returns an u64!
GOM(clogf, UEs) //%noE float complex doesn't trigger the ret 4, but returns an u64!
// clogl // Weak
// conj // Weak
// conjf // Weak
// conjl // Weak
GOW(copysign, dFdd)
GOW(copysignf, fFff)
GOW(copysign, dEdd)
GOW(copysignf, fEff)
// copysignl // Weak
GOW(cos, dFd)
GOW(cosf, fFf)
GOW(cosh, dFd)
GOW(coshf, fFf)
GOM(__coshf_finite, fFf) //%noE
GOM(__cosh_finite, dFd) //%noE
GOW(cos, dEd)
GOW(cosf, fEf)
GOW(cosh, dEd)
GOW(coshf, fEf)
GOM(__coshf_finite, fEf) //%noE
GOM(__cosh_finite, dEd) //%noE
// coshl // Weak
// cosl // Weak
//GOWS(cpow, pFpsvvvvs) //%% return complex
GOWM(cpowf, UFsvvs) //%noE
//GOWS(cpow, pEpsvvvvs) //%% return complex
GOWM(cpowf, UEsvvs) //%noE
// cpowl // Weak
//GOS(cproj, pFps) //%% double complex
GOM(cprojf, UFs) //%noE
//GOS(cproj, pEps) //%% double complex
GOM(cprojf, UEs) //%noE
// cprojl // Weak
// creal // Weak
// crealf // Weak
// creall // Weak
//GOWS(csin, pFps) //%% return complex
GOWM(csinf, UFs) //%noE return complex
//GOWS(csinh, pFps) //%% return complex
GOWM(csinhf, UFs) //%noE return complex
//GOWS(csin, pEps) //%% return complex
GOWM(csinf, UEs) //%noE return complex
//GOWS(csinh, pEps) //%% return complex
GOWM(csinhf, UEs) //%noE return complex
// csinhl // Weak
// csinl // Weak
//GOWS(csqrt, pFps) //%%
GOWM(csqrtf, UFs) //%noE
//GOWS(csqrt, pEps) //%%
GOWM(csqrtf, UEs) //%noE
// csqrtl // Weak
//GOWS(ctan, pFps) //%% return complex
GOWM(ctanf, UFs) //%noE return complex
//GOWS(ctanh, pFps) //%% return complex
GOWM(ctanhf, UFs) //%noE return complex
//GOWS(ctan, pEps) //%% return complex
GOWM(ctanf, UEs) //%noE return complex
//GOWS(ctanh, pEps) //%% return complex
GOWM(ctanhf, UEs) //%noE return complex
// ctanhl // Weak
// ctanl // Weak
// __cxa_finalize // Weak
// drem // Weak
// dremf // Weak
// dreml // Weak
GOW(erf, dFd)
GOW(erfc, dFd)
GOW(erfcf, fFf)
GOW(erf, dEd)
GOW(erfc, dEd)
GOW(erfcf, fEf)
#ifdef HAVE_LD80BITS
GOW(erfcl, DFD)
GOW(erfcl, DED)
#else
GOW2(erfcl, KFK, erfc)
GOW2(erfcl, KEK, erfc)
#endif
GOW(erff, fFf)
GOW(erff, fEf)
#ifdef HAVE_LD80BITS
GOW(erfl, DFD)
GOW(erfl, DED)
#else
GOW2(erfl, KFK, erf)
GOW2(erfl, KEK, erf)
#endif
GOW(exp, dFd)
GOW(exp10, dFd)
GOW(exp10f, fFf)
GOW(exp, dEd)
GOW(exp10, dEd)
GOW(exp10f, fEf)
// __exp10f_finite
// __exp10_finite
// exp10l // Weak
GOW(exp2, dFd)
GOW(exp2f, fFf)
GOM(__exp2f_finite, fFf) //%noE
GOM(__exp2_finite, dFd) //%noE
GOW(exp2, dEd)
GOW(exp2f, fEf)
GOM(__exp2f_finite, fEf) //%noE
GOM(__exp2_finite, dEd) //%noE
// exp2l // Weak
GOW(expf, fFf)
GOM(__expf_finite, fFf) //%noE
GOM(__exp_finite, dFd) //%noE
GOW(expf, fEf)
GOM(__expf_finite, fEf) //%noE
GOM(__exp_finite, dEd) //%noE
// expl // Weak
GOW(expm1, dFd)
GOW(expm1f, fFf)
GOW(expm1, dEd)
GOW(expm1f, fEf)
// expm1l // Weak
GOW(fabs, dFd)
GOW(fabsf, fFf)
GOW(fabs, dEd)
GOW(fabsf, fEf)
// fabsl // Weak
// fdim // Weak
// fdimf // Weak
// fdiml // Weak
GO(feclearexcept, iFi)
GO(fedisableexcept, iFi)
GO(feenableexcept, iFi)
GO(fegetenv, iFp)
GO(fegetexcept, iFv)
GO(fegetexceptflag, iFpi)
GO(fegetround, iFv)
GO(feholdexcept, iFp)
GO(feraiseexcept, iFi)
GO(fesetenv, iFp)
GO(fesetexceptflag, iFpi)
GO(fesetround, iFi)
GO(fetestexcept, iFi)
GO(feupdateenv, iFp)
GOW(finite, iFd)
GO(feclearexcept, iEi)
GO(fedisableexcept, iEi)
GO(feenableexcept, iEi)
GO(fegetenv, iEp)
GO(fegetexcept, iEv)
GO(fegetexceptflag, iEpi)
GO(fegetround, iEv)
GO(feholdexcept, iEp)
GO(feraiseexcept, iEi)
GO(fesetenv, iEp)
GO(fesetexceptflag, iEpi)
GO(fesetround, iEi)
GO(fetestexcept, iEi)
GO(feupdateenv, iEp)
GOW(finite, iEd)
// __finite
GOW(finitef, iFf)
GO(__finitef, iFf)
GOW(finitef, iEf)
GO(__finitef, iEf)
// finitel // Weak
// __finitel
GOW(floor, dFd)
GOW(floorf, fFf)
GOW(floor, dEd)
GOW(floorf, fEf)
// floorl // Weak
GOW(fma, dFddd)
GOW(fmaf, fFfff)
GOW(fma, dEddd)
GOW(fmaf, fEfff)
// fmal // Weak
GOW(fmax, dFdd)
GOW(fmaxf, fFff)
GOW(fmax, dEdd)
GOW(fmaxf, fEff)
// fmaxl // Weak
GOW(fmin, dFdd)
GOW(fminf, fFff)
GOW(fmin, dEdd)
GOW(fminf, fEff)
// fminl // Weak
GOW(fmod, dFdd)
GOW(fmodf, fFff)
GOW(fmod, dEdd)
GOW(fmodf, fEff)
// __fmodf_finite
// __fmod_finite
#ifdef HAVE_LD80BITS
GOW(fmodl, DFDD)
GOW(fmodl, DEDD)
#else
GOW2(fmodl, KFKK, fmod)
GOW2(fmodl, KEKK, fmod)
#endif
GO(__fpclassify, iFd)
GO(__fpclassifyf, iFf)
GOW(frexp, dFdp)
GOW(frexpf, fFfp)
GO(__fpclassify, iEd)
GO(__fpclassifyf, iEf)
GOW(frexp, dEdp)
GOW(frexpf, fEfp)
#ifdef HAVE_LD80BITS
GOW(frexpl, DFDp)
GOW(frexpl, DEDp)
#else
GOW2(frexpl, KFKp, frexp)
GOW2(frexpl, KEKp, frexp)
#endif
// gamma // Weak
// gammaf // Weak
@ -246,150 +246,150 @@ GOW2(frexpl, KFKp, frexp)
// gammal // Weak
// __gamma_r_finite
// __gmon_start__ // Weak
GOW(hypot, dFdd)
GOW(hypotf, fFff)
GOM(__hypotf_finite, fFff) //%noE
GOM(__hypot_finite, dFdd) //%noE
GOW(hypot, dEdd)
GOW(hypotf, fEff)
GOM(__hypotf_finite, fEff) //%noE
GOM(__hypot_finite, dEdd) //%noE
// hypotl // Weak
GOW(ilogb, iFd)
GOW(ilogbf, iFf)
GOW(ilogb, iEd)
GOW(ilogbf, iEf)
// ilogbl // Weak
// __issignaling
// __issignalingf
// _ITM_deregisterTMCloneTable // Weak
// _ITM_registerTMCloneTable // Weak
GO(j0, dFd)
GO(j0f, fFf)
GO(j0, dEd)
GO(j0f, fEf)
// __j0f_finite
// __j0_finite
// j0l
GO(j1, dFd)
GO(j1f, fFf)
GO(j1, dEd)
GO(j1f, fEf)
// __j1f_finite
// __j1_finite
// j1l
GO(jn, dFid)
GO(jnf, fFif)
GO(jn, dEid)
GO(jnf, fEif)
// __jnf_finite
// __jn_finite
// jnl
GOW(ldexp, dFdi)
GOW(ldexpf, fFfi)
GOW(ldexp, dEdi)
GOW(ldexpf, fEfi)
#ifdef HAVE_LD80BITS
GOW(ldexpl, DFD)
GOW(ldexpl, DED)
#else
GOW2(ldexpl, KFK, ldexp)
GOW2(ldexpl, KEK, ldexp)
#endif
GOW(lgamma, dFd)
GOW(lgammaf, fFf)
GOW(lgammaf_r, fFfp)
GOW(lgamma, dEd)
GOW(lgammaf, fEf)
GOW(lgammaf_r, fEfp)
// __lgammaf_r_finite
#ifdef HAVE_LD80BITS
GOW(lgammal, DFD)
GOW(lgammal, DED)
#else
GOW2(lgammal, KFK, lgamma)
GOW2(lgammal, KEK, lgamma)
#endif
#ifdef HAVE_LD80BITS
GOW(lgammal_r, DFDp)
GOW(lgammal_r, DEDp)
#else
GOW2(lgammal_r, KFKp, lgamma_r)
GOW2(lgammal_r, KEKp, lgamma_r)
#endif
GOW(lgamma_r, dFdp)
GOW(lgamma_r, dEdp)
// __lgamma_r_finite
DATAV(_LIB_VERSION, 4)
GOW(llrint, IFd)
GOW(llrintf, IFf)
GOW(llrint, IEd)
GOW(llrintf, IEf)
// llrintl // Weak
GOW(llround, IFd)
GOW(llroundf, IFf)
GOW(llround, IEd)
GOW(llroundf, IEf)
// llroundl // Weak
GOW(log, dFd)
GOW(log10, dFd)
GOW(log10f, fFf)
GOM(__log10f_finite, fFf) //%noE
GOM(__log10_finite, dFd) //%noE
GOW(log, dEd)
GOW(log10, dEd)
GOW(log10f, fEf)
GOM(__log10f_finite, fEf) //%noE
GOM(__log10_finite, dEd) //%noE
// log10l // Weak
GOW(log1p, dFd)
GOW(log1pf, fFf)
GOW(log1p, dEd)
GOW(log1pf, fEf)
// log1pl // Weak
GOW(log2, dFd)
GOW(log2f, fFf)
GOM(__log2f_finite, fFf) //%noE
GOM(__log2_finite, dFd) //%noE
GOW(log2, dEd)
GOW(log2f, fEf)
GOM(__log2f_finite, fEf) //%noE
GOM(__log2_finite, dEd) //%noE
// log2l // Weak
GOW(logb, dFd)
GOW(logbf, fFf)
GOW(logb, dEd)
GOW(logbf, fEf)
// logbl // Weak
GOW(logf, fFf)
GOM(__logf_finite, fFf) //%noE
GOM(__log_finite, dFd) //%noE
GOW(logf, fEf)
GOM(__logf_finite, fEf) //%noE
GOM(__log_finite, dEd) //%noE
#ifdef HAVE_LD80BITS
GOW(logl, DFD)
GOW(logl, DED)
#else
GOW2(logl, KFK, log)
GOW2(logl, KEK, log)
#endif
GOW(lrint, iFd)
GOW(lrintf, iFf)
GOW(lrint, iEd)
GOW(lrintf, iEf)
// lrintl // Weak
GOW(lround, iFd)
GOW(lroundf, iFf)
GOW(lround, iEd)
GOW(lroundf, iEf)
// lroundl // Weak
// matherr // Weak
GOW(modf, dFdp)
GOW(modff, fFfp)
GOW(modf, dEdp)
GOW(modff, fEfp)
// modfl // Weak
// nan // Weak
// nanf // Weak
// nanl // Weak
GOW(nearbyint, dFd)
GOW(nearbyintf, fFf)
GOW(nearbyint, dEd)
GOW(nearbyintf, fEf)
// nearbyintl // Weak
GOW(nextafter, dFdd)
GOW(nextafterf, fFff)
GOW(nextafter, dEdd)
GOW(nextafterf, fEff)
// nextafterl // Weak
GOW(nexttoward, dFdD)
GOW(nexttowardf, fFfD)
GOW(nexttoward, dEdD)
GOW(nexttowardf, fEfD)
// nexttowardl // Weak
GOW(pow, dFdd)
GOW(pow10, dFd)
GOW(pow10f, fFf)
GOW(pow, dEdd)
GOW(pow10, dEd)
GOW(pow10f, fEf)
#ifdef HAVE_LD80BITS
GOWM(pow10l, DFD) //%noE
GOWM(pow10l, DED) //%noE
#else
GOWM(pow10l, KFK) //%noE
GOWM(pow10l, KEK) //%noE
#endif
GOW(powf, fFff)
GOM(__powf_finite, fFff) //%noE
GOM(__pow_finite, dFdd) //%noE
GOW(powf, fEff)
GOM(__powf_finite, fEff) //%noE
GOM(__pow_finite, dEdd) //%noE
#ifdef HAVE_LD80BITS
GOW(powl, DFDD)
GOW(powl, DEDD)
#else
GOW2(powl, KFKK, pow)
GOW2(powl, KEKK, pow)
#endif
GOW(remainder, dFdd)
GOW(remainderf, fFff)
GOW(remainder, dEdd)
GOW(remainderf, fEff)
// __remainderf_finite
// __remainder_finite
// remainderl // Weak
GOW(remquo, dFddp)
GOW(remquof, fFffp)
GOW(remquo, dEddp)
GOW(remquof, fEffp)
// remquol // Weak
GOW(rint, dFd)
GOW(rintf, fFf)
GOW(rint, dEd)
GOW(rintf, fEf)
// rintl // Weak
GOW(round, dFd)
GOW(roundf, fFf)
GOW(round, dEd)
GOW(roundf, fEf)
// roundl // Weak
// scalb // Weak
// scalbf // Weak
// __scalbf_finite
// __scalb_finite
// scalbl // Weak
GOW(scalbln, dFdi)
GOW(scalblnf, fFfi)
GOW(scalbln, dEdi)
GOW(scalblnf, fEfi)
// scalblnl // Weak
GOW(scalbn, dFdi)
GOW(scalbnf, fFfi)
GOW(scalbn, dEdi)
GOW(scalbnf, fEfi)
// scalbnl // Weak
// __signbit
// __signbitf
@ -397,50 +397,50 @@ DATAB(signgam, 4)
// significand // Weak
// significandf // Weak
// significandl // Weak
GOW(sin, dFd)
GOW(sincos, vFdpp)
GOW(sincosf, vFfpp)
GOW(sin, dEd)
GOW(sincos, vEdpp)
GOW(sincosf, vEfpp)
// sincosl // Weak
GOW(sinf, fFf)
GOW(sinh, dFd)
GOW(sinhf, fFf)
GOM(__sinhf_finite, fFf) //%noE
GOM(__sinh_finite, dFd) //%noE
GOW(sinf, fEf)
GOW(sinh, dEd)
GOW(sinhf, fEf)
GOM(__sinhf_finite, fEf) //%noE
GOM(__sinh_finite, dEd) //%noE
// sinhl // Weak
// sinl // Weak
GOW(sqrt, dFd)
GOW(sqrtf, fFf)
GOM(__sqrtf_finite, fFf) //%noE
GOM(__sqrt_finite, dFd) //%noE
GOW(sqrt, dEd)
GOW(sqrtf, fEf)
GOM(__sqrtf_finite, fEf) //%noE
GOM(__sqrt_finite, dEd) //%noE
// sqrtl // Weak
GO(tan, dFd)
GOW(tanf, fFf)
GOW(tanh, dFd)
GOW(tanhf, fFf)
GO(tan, dEd)
GOW(tanf, fEf)
GOW(tanh, dEd)
GOW(tanhf, fEf)
// tanhl // Weak
// tanl // Weak
GOW(tgamma, dFd)
GOW(tgammaf, fFf)
GOW(tgamma, dEd)
GOW(tgammaf, fEf)
#ifdef HAVE_LD80BITS
GOW(tgammal, DFD)
GOW(tgammal, DED)
#else
GOW2(tgammal, KFK, tgamma)
GOW2(tgammal, KEK, tgamma)
#endif
GOW(trunc, dFd)
GOW(truncf, fFf)
GOW(trunc, dEd)
GOW(truncf, fEf)
// truncl // Weak
GO(y0, dFd)
GO(y0f, fFf)
GO(y0, dEd)
GO(y0f, fEf)
// __y0f_finite
// __y0_finite
// y0l
GO(y1, dFd)
GO(y1f, fFf)
GO(y1, dEd)
GO(y1f, fEf)
// __y1f_finite
// __y1_finite
// y1l
GO(yn, dFid)
GO(ynf, fFif)
GO(yn, dEid)
GO(ynf, fEif)
// __ynf_finite
// __yn_finite
// ynl

View File

@ -15,175 +15,175 @@
// __libc_allocate_rtsig
// __libc_current_sigrtmax
// __libc_current_sigrtmin
GOM(pthread_atfork, iFEppp)
GOM(__pthread_atfork, iFEppp)
GOM(pthread_attr_destroy, iFEp)
GOM(pthread_atfork, iEEppp)
GOM(__pthread_atfork, iEEppp)
GOM(pthread_attr_destroy, iEEp)
// pthread_attr_getaffinity_np
GOM(pthread_attr_getdetachstate, iFEpp)
GOM(pthread_attr_getguardsize, iFEpp)
GOM(pthread_attr_getinheritsched, iFEpp)
GOM(pthread_attr_getschedparam, iFEpp)
GOM(pthread_attr_getschedpolicy, iFEpp)
GOM(pthread_attr_getscope, iFEpp)
GOM(pthread_attr_getstack, iFEppp)
GOM(pthread_attr_getstackaddr, iFEpp)
GOM(pthread_attr_getstacksize, iFEpp)
GOM(pthread_attr_init, iFEp)
GOM(pthread_attr_setaffinity_np, iFEpup)
GOM(pthread_attr_setdetachstate, iFEpi)
GOM(pthread_attr_setguardsize, iFEpL)
GOM(pthread_attr_setinheritsched, iFEpi)
GOM(pthread_attr_setschedparam, iFEpp)
GOM(pthread_attr_setschedpolicy, iFEpi)
GOM(pthread_attr_setscope, iFEpi)
GOM(pthread_attr_setstack, iFEppL)
GOM(pthread_attr_setstackaddr, iFEpp)
GOM(pthread_attr_setstacksize, iFEpL)
GO(pthread_barrierattr_destroy, iFp)
GO(pthread_barrierattr_getpshared, iFpp)
GO(pthread_barrierattr_init, iFp)
GO(pthread_barrierattr_setpshared, iFpi)
GO(pthread_barrier_destroy, iFp)
GO(pthread_barrier_init, iFppu)
GO(pthread_barrier_wait, iFp)
GO(pthread_cancel, iFh)
GOM(_pthread_cleanup_pop, vFEpi)
GOM(_pthread_cleanup_pop_restore, vFEpi)
GOM(_pthread_cleanup_push, vFEppp)
GOM(_pthread_cleanup_push_defer, vFEppp)
GOM(pthread_attr_getdetachstate, iEEpp)
GOM(pthread_attr_getguardsize, iEEpp)
GOM(pthread_attr_getinheritsched, iEEpp)
GOM(pthread_attr_getschedparam, iEEpp)
GOM(pthread_attr_getschedpolicy, iEEpp)
GOM(pthread_attr_getscope, iEEpp)
GOM(pthread_attr_getstack, iEEppp)
GOM(pthread_attr_getstackaddr, iEEpp)
GOM(pthread_attr_getstacksize, iEEpp)
GOM(pthread_attr_init, iEEp)
GOM(pthread_attr_setaffinity_np, iEEpup)
GOM(pthread_attr_setdetachstate, iEEpi)
GOM(pthread_attr_setguardsize, iEEpL)
GOM(pthread_attr_setinheritsched, iEEpi)
GOM(pthread_attr_setschedparam, iEEpp)
GOM(pthread_attr_setschedpolicy, iEEpi)
GOM(pthread_attr_setscope, iEEpi)
GOM(pthread_attr_setstack, iEEppL)
GOM(pthread_attr_setstackaddr, iEEpp)
GOM(pthread_attr_setstacksize, iEEpL)
GO(pthread_barrierattr_destroy, iEp)
GO(pthread_barrierattr_getpshared, iEpp)
GO(pthread_barrierattr_init, iEp)
GO(pthread_barrierattr_setpshared, iEpi)
GO(pthread_barrier_destroy, iEp)
GO(pthread_barrier_init, iEppu)
GO(pthread_barrier_wait, iEp)
GO(pthread_cancel, iEh)
GOM(_pthread_cleanup_pop, vEEpi)
GOM(_pthread_cleanup_pop_restore, vEEpi)
GOM(_pthread_cleanup_push, vEEppp)
GOM(_pthread_cleanup_push_defer, vEEppp)
// __pthread_cleanup_routine
GO(pthread_condattr_destroy, iFp)
GO(pthread_condattr_getclock, iFpp)
GO(pthread_condattr_getpshared, iFpp)
GO(pthread_condattr_init, iFp)
GO(pthread_condattr_setclock, iFpp)
GO(pthread_condattr_setpshared, iFpi)
GO2(pthread_cond_broadcast@GLIBC_2.0, iFEp, my32_pthread_cond_broadcast_old)
GO2(pthread_cond_destroy@GLIBC_2.0, iFEp, my32_pthread_cond_destroy_old)
GO2(pthread_cond_init@GLIBC_2.0, iFEpp, my32_pthread_cond_init_old)
GO2(pthread_cond_signal@GLIBC_2.0, iFEp, my32_pthread_cond_signal_old)
GO2(pthread_cond_timedwait@GLIBC_2.0, iFEpprLL_, my32_pthread_cond_timedwait_old)
GO2(pthread_cond_wait@GLIBC_2.0, iFEpp, my32_pthread_cond_wait_old)
GOM(pthread_cond_broadcast, iFEp)
GOM(pthread_cond_destroy, iFEp)
GOM(pthread_cond_init, iFEpp)
GOM(pthread_cond_signal, iFEp)
GOM(pthread_cond_timedwait, iFEpprLL_)
GOM(pthread_cond_wait, iFEpp)
GOM(pthread_create, iFEBh_ppp)
GOM(pthread_detach, iFEh)
GO(pthread_equal, iFhh)
GO(pthread_exit, vFp)
GOM(pthread_getaffinity_np, iFEhup)
GOM(pthread_getattr_np, iFEhp)
GO(pthread_getconcurrency, iFv)
GO(pthread_getcpuclockid, iFhp)
GO(pthread_getschedparam, iFhpp)
GO(__pthread_getspecific, pFu)
GO(pthread_getspecific, pFu)
GO(pthread_getname_np, iFhpL)
GOM(__pthread_initialize, vFv) //%noE doesn't exist anymore...
GO(pthread_condattr_destroy, iEp)
GO(pthread_condattr_getclock, iEpp)
GO(pthread_condattr_getpshared, iEpp)
GO(pthread_condattr_init, iEp)
GO(pthread_condattr_setclock, iEpp)
GO(pthread_condattr_setpshared, iEpi)
GO2(pthread_cond_broadcast@GLIBC_2.0, iEEp, my32_pthread_cond_broadcast_old)
GO2(pthread_cond_destroy@GLIBC_2.0, iEEp, my32_pthread_cond_destroy_old)
GO2(pthread_cond_init@GLIBC_2.0, iEEpp, my32_pthread_cond_init_old)
GO2(pthread_cond_signal@GLIBC_2.0, iEEp, my32_pthread_cond_signal_old)
GO2(pthread_cond_timedwait@GLIBC_2.0, iEEpprLL_, my32_pthread_cond_timedwait_old)
GO2(pthread_cond_wait@GLIBC_2.0, iEEpp, my32_pthread_cond_wait_old)
GOM(pthread_cond_broadcast, iEEp)
GOM(pthread_cond_destroy, iEEp)
GOM(pthread_cond_init, iEEpp)
GOM(pthread_cond_signal, iEEp)
GOM(pthread_cond_timedwait, iEEpprLL_)
GOM(pthread_cond_wait, iEEpp)
GOM(pthread_create, iEEBh_ppp)
GOM(pthread_detach, iEEh)
GO(pthread_equal, iEhh)
GO(pthread_exit, vEp)
GOM(pthread_getaffinity_np, iEEhup)
GOM(pthread_getattr_np, iEEhp)
GO(pthread_getconcurrency, iEv)
GO(pthread_getcpuclockid, iEhp)
GO(pthread_getschedparam, iEhpp)
GO(__pthread_getspecific, pEu)
GO(pthread_getspecific, pEu)
GO(pthread_getname_np, iEhpL)
GOM(__pthread_initialize, vEv) //%noE doesn't exist anymore...
// __pthread_initialize_minimal
GO(pthread_join, iFHBp_)
GOM(__pthread_key_create, iFEpp)
GOM(pthread_key_create, iFEpp)
GO(pthread_key_delete, iFu)
GO(pthread_kill, iFhi)
GO2(pthread_kill@GLIBC_2.0, iFEhi, my32_pthread_kill_old)
GO(pthread_join, iEHBp_)
GOM(__pthread_key_create, iEEpp)
GOM(pthread_key_create, iEEpp)
GO(pthread_key_delete, iEu)
GO(pthread_kill, iEhi)
GO2(pthread_kill@GLIBC_2.0, iEEhi, my32_pthread_kill_old)
// pthread_kill_other_threads_np
GO(__pthread_mutexattr_destroy, iFp)
GO(pthread_mutexattr_destroy, iFp)
GO(pthread_mutexattr_getprioceiling, iFpp)
GO(pthread_mutexattr_getprotocol, iFpp)
GO(__pthread_mutexattr_destroy, iEp)
GO(pthread_mutexattr_destroy, iEp)
GO(pthread_mutexattr_getprioceiling, iEpp)
GO(pthread_mutexattr_getprotocol, iEpp)
// pthread_mutexattr_getpshared
// pthread_mutexattr_getrobust_np
GO(pthread_mutexattr_gettype, iFpp)
GO2(__pthread_mutexattr_init, iFp, my32_pthread_mutexattr_init)
GOM(pthread_mutexattr_init, iFEp)
GO(pthread_mutexattr_setprioceiling, iFpi)
GO(pthread_mutexattr_setprotocol, iFpp)
GO(pthread_mutexattr_setpshared, iFpi)
GO(pthread_mutexattr_gettype, iEpp)
GO2(__pthread_mutexattr_init, iEp, my32_pthread_mutexattr_init)
GOM(pthread_mutexattr_init, iEEp)
GO(pthread_mutexattr_setprioceiling, iEpi)
GO(pthread_mutexattr_setprotocol, iEpp)
GO(pthread_mutexattr_setpshared, iEpi)
// pthread_mutexattr_setrobust_np
GO(__pthread_mutexattr_settype, iFpi)
GO(pthread_mutexattr_settype, iFpi)
GO(__pthread_mutexattr_settype, iEpi)
GO(pthread_mutexattr_settype, iEpi)
// pthread_mutex_consistent_np
GOM(__pthread_mutex_destroy, iFp) //%noE
GOM(pthread_mutex_destroy, iFp) //%noE
GOM(__pthread_mutex_destroy, iEp) //%noE
GOM(pthread_mutex_destroy, iEp) //%noE
// pthread_mutex_getprioceiling
GOM(__pthread_mutex_init, iFpp) //%noE
GOM(pthread_mutex_init, iFpp) //%noE
GOM(__pthread_mutex_lock, iFp) //%noE
GOM(pthread_mutex_lock, iFp) //%noE
GOM(__pthread_mutex_init, iEpp) //%noE
GOM(pthread_mutex_init, iEpp) //%noE
GOM(__pthread_mutex_lock, iEp) //%noE
GOM(pthread_mutex_lock, iEp) //%noE
// pthread_mutex_setprioceiling
GOM(pthread_mutex_timedlock, iFpp) //%noE
GOM(__pthread_mutex_trylock, iFp) //%noE
GOM(pthread_mutex_trylock, iFp) //%noE
GOM(__pthread_mutex_unlock, iFp) //%noE
GOM(pthread_mutex_unlock, iFp) //%noE
GOM(pthread_once, iFEpp)
GOM(__pthread_once, iFEpp)
GOM(__pthread_register_cancel, vFEp)
GOM(pthread_mutex_timedlock, iEpp) //%noE
GOM(__pthread_mutex_trylock, iEp) //%noE
GOM(pthread_mutex_trylock, iEp) //%noE
GOM(__pthread_mutex_unlock, iEp) //%noE
GOM(pthread_mutex_unlock, iEp) //%noE
GOM(pthread_once, iEEpp)
GOM(__pthread_once, iEEpp)
GOM(__pthread_register_cancel, vEEp)
// __pthread_register_cancel_defer
GO(pthread_rwlockattr_destroy, vFp)
GO(pthread_rwlockattr_getkind_np, iFpp)
GO(pthread_rwlockattr_destroy, vEp)
GO(pthread_rwlockattr_getkind_np, iEpp)
// pthread_rwlockattr_getpshared
GO(pthread_rwlockattr_init, iFp)
GO(pthread_rwlockattr_setkind_np, iFpi)
GO(pthread_rwlockattr_init, iEp)
GO(pthread_rwlockattr_setkind_np, iEpi)
// pthread_rwlockattr_setpshared
// __pthread_rwlock_destroy
GOM(pthread_rwlock_destroy, iFp) //%noE
GOM(__pthread_rwlock_init, iFpp) //%noE
GOM(pthread_rwlock_init, iFpp) //%noE
GO(__pthread_rwlock_rdlock, iFp)
GO(pthread_rwlock_rdlock, iFp)
GOM(pthread_rwlock_destroy, iEp) //%noE
GOM(__pthread_rwlock_init, iEpp) //%noE
GOM(pthread_rwlock_init, iEpp) //%noE
GO(__pthread_rwlock_rdlock, iEp)
GO(pthread_rwlock_rdlock, iEp)
// pthread_rwlock_timedrdlock
// pthread_rwlock_timedwrlock
// __pthread_rwlock_tryrdlock
GO(pthread_rwlock_tryrdlock, iFp)
GO(pthread_rwlock_tryrdlock, iEp)
// __pthread_rwlock_trywrlock
GO(pthread_rwlock_trywrlock, iFp)
GO(__pthread_rwlock_unlock, iFp)
GOM(pthread_rwlock_unlock, iFp) //%noE
GO(__pthread_rwlock_wrlock, iFp)
GOM(pthread_rwlock_wrlock, iFp) //%noE
GO(pthread_self, hFv)
GOM(pthread_setaffinity_np, iFEhup)
GO(pthread_setcancelstate, iFip)
GO(pthread_setcanceltype, iFip)
GO(pthread_setconcurrency, iFi)
GO(pthread_setname_np, iFhp)
GO(pthread_setschedparam, iFhip)
GO(pthread_setschedprio, iFhi)
GO(__pthread_setspecific, iFup)
GO(pthread_setspecific, iFup)
GO(pthread_sigmask, iFipp)
GO(pthread_spin_destroy, iFp)
GO(pthread_spin_init, iFpi)
GO(pthread_spin_lock, iFp)
GO(pthread_spin_trylock, iFp)
GO(pthread_spin_unlock, iFp)
GO(pthread_testcancel, vFv)
GO(pthread_timedjoin_np, iFppp)
GO(pthread_tryjoin_np, iFpp)
GOM(__pthread_unregister_cancel, vFEp)
GO(pthread_rwlock_trywrlock, iEp)
GO(__pthread_rwlock_unlock, iEp)
GOM(pthread_rwlock_unlock, iEp) //%noE
GO(__pthread_rwlock_wrlock, iEp)
GOM(pthread_rwlock_wrlock, iEp) //%noE
GO(pthread_self, hEv)
GOM(pthread_setaffinity_np, iEEhup)
GO(pthread_setcancelstate, iEip)
GO(pthread_setcanceltype, iEip)
GO(pthread_setconcurrency, iEi)
GO(pthread_setname_np, iEhp)
GO(pthread_setschedparam, iEhip)
GO(pthread_setschedprio, iEhi)
GO(__pthread_setspecific, iEup)
GO(pthread_setspecific, iEup)
GO(pthread_sigmask, iEipp)
GO(pthread_spin_destroy, iEp)
GO(pthread_spin_init, iEpi)
GO(pthread_spin_lock, iEp)
GO(pthread_spin_trylock, iEp)
GO(pthread_spin_unlock, iEp)
GO(pthread_testcancel, vEv)
GO(pthread_timedjoin_np, iEppp)
GO(pthread_tryjoin_np, iEpp)
GOM(__pthread_unregister_cancel, vEEp)
// __pthread_unregister_cancel_restore
// __pthread_unwind
GOM(__pthread_unwind_next, vFEp)
GO(pthread_yield, iFv)
GOM(__pthread_unwind_next, vEEp)
GO(pthread_yield, iEv)
// raise
// __res_state
GOM(sem_close, iFp) //%noE
GOM(sem_destroy, iFp) //%noE
GOM(sem_getvalue, iFpp) //%noE
GOM(sem_init, iFpiu) //%noE
GOM(sem_open, pFpOM) //%noE
GOM(sem_post, iFp) //%noE
GOM(sem_timedwait, iFprLL_) //%noE
GOM(sem_trywait, iFp) //%noE
GO(sem_unlink, iFp) // no need for M here?
GOM(sem_wait, iFp) //%noE
GOM(sem_close, iEp) //%noE
GOM(sem_destroy, iEp) //%noE
GOM(sem_getvalue, iEpp) //%noE
GOM(sem_init, iEpiu) //%noE
GOM(sem_open, pEpOM) //%noE
GOM(sem_post, iEp) //%noE
GOM(sem_timedwait, iEprLL_) //%noE
GOM(sem_trywait, iEp) //%noE
GO(sem_unlink, iEp) // no need for M here?
GOM(sem_wait, iEp) //%noE
// __sigaction
// system
// __vfork
GOM(pthread_mutexattr_setkind_np, iFEpi) // deprecated
GOM(pthread_mutexattr_setkind_np, iEEpi) // deprecated

View File

@ -11,28 +11,28 @@
// aio_cancel
// aio_cancel64
// aio_error
GO(aio_error64, iFp)
GO(aio_fsync, iFip)
GO(aio_fsync64, iFip)
GO(aio_error64, iEp)
GO(aio_fsync, iEip)
GO(aio_fsync64, iEip)
// aio_init
// aio_read
GO(aio_read64, iFp)
GO(aio_read64, iEp)
// aio_return
GO(aio_return64, lFp)
GO(aio_suspend, iFpip)
GO(aio_suspend64, iFpip)
GO(aio_return64, lEp)
GO(aio_suspend, iEpip)
GO(aio_suspend64, iEpip)
// aio_write
GO(aio_write64, iFp)
GO(clock_getcpuclockid, iFup)
GO(clock_getres, iFup)
GO(clock_gettime, iFuBLL_) // *timespec
GO2(__clock_gettime, iFuBLL_, clock_gettime)
GO(clock_nanosleep, iFuirLL_BLL_)
//GO(clock_settime, iFup)
GO(aio_write64, iEp)
GO(clock_getcpuclockid, iEup)
GO(clock_getres, iEuBLL_)
GO(clock_gettime, iEuBLL_) // *timespec
GO2(__clock_gettime, iEuBLL_, clock_gettime)
GO(clock_nanosleep, iEuirLL_BLL_)
//GO(clock_settime, iEup)
// lio_listio
// lio_listio64
// mq_close
GO(mq_getattr, iFip)
GO(mq_getattr, iEip)
// mq_notify
// mq_open
// __mq_open_2
@ -42,10 +42,10 @@ GO(mq_getattr, iFip)
// mq_timedreceive
// mq_timedsend
// mq_unlink
GO(shm_open, iFpOu)
GO(shm_unlink, iFp)
//GOM(timer_create, iFEupp)
GO(timer_delete, iFu)
GO(timer_getoverrun, iFu)
//GO(timer_gettime, iFup) //time_t is L, timespec is struct LL, itimerspec (the p) is 2 timespec
//GO(timer_settime, iFuipp) //same, p are itimerspec
GO(shm_open, iEpOu)
GO(shm_unlink, iEp)
//GOM(timer_create, iEEupp)
GO(timer_delete, iEu)
GO(timer_getoverrun, iEu)
//GO(timer_gettime, iEup) //time_t is L, timespec is struct LL, itimerspec (the p) is 2 timespec
//GO(timer_settime, iEuipp) //same, p are itimerspec