diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-08-30 13:22:38 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-08-30 13:22:48 +0200 |
| commit | 3fb50522232028e55ea97ccbc9a6bd55b031ff08 (patch) | |
| tree | c72aa2496be3fd1a4ebf3638f26d06e549da1f8d | |
| parent | 62b93a0785802120250423fcc4acae9a51555126 (diff) | |
| download | box64-3fb50522232028e55ea97ccbc9a6bd55b031ff08.tar.gz box64-3fb50522232028e55ea97ccbc9a6bd55b031ff08.zip | |
[BOX32] More 32bits wrapped functions and fixes
| -rw-r--r-- | src/emu/x64emu_private.h | 9 | ||||
| -rwxr-xr-x | src/emu/x86int3.c | 40 | ||||
| -rwxr-xr-x | src/include/myalign32.h | 20 | ||||
| -rwxr-xr-x | src/libtools/myalign64_32.c | 21 | ||||
| -rwxr-xr-x | src/libtools/threads32.c | 41 | ||||
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 18 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibctypes32.h | 6 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibpthreadtypes32.h | 9 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 14 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 7 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc.c | 48 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc_private.h | 21 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibpthread_private.h | 13 |
13 files changed, 202 insertions, 65 deletions
diff --git a/src/emu/x64emu_private.h b/src/emu/x64emu_private.h index ff4ad618..bf59137d 100644 --- a/src/emu/x64emu_private.h +++ b/src/emu/x64emu_private.h @@ -135,9 +135,12 @@ typedef struct x64emu_s { int type; // EMUTYPE_xxx define #ifdef BOX32 int libc_err; // copy of errno from libc - unsigned short libctype[384]; // copy from __ctype_b because, again, is thread local - const unsigned short** ref_ctype; - const unsigned short* ctype; + unsigned short libctype[384]; // copy from __ctype_b address might be too high + const unsigned short** ref_ctype; + const unsigned short* ctype; + int libctolower[384]; // copy from __ctype_b_tolower address might be too high + const int** ref_tolower; + const int* tolower; #endif } x64emu_t; diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index 8fb64505..540959c6 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -153,7 +153,7 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) snprintf(buff, 255, "%04d|%p: Calling %s(%d, 0x%x, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(int32_t*)from_ptr(R_ESP+4), *(int32_t*)from_ptr(R_ESP+8), *(void**)from_ptr(R_ESP+12)); perr = 1; } else if(strstr(s, "statvfs64")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); + snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(strstr(s, "index")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %i(%c))", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int32_t*)from_ptr(R_ESP+8), *(int32_t*)from_ptr(R_ESP+8)); } else if(strstr(s, "rindex")==s) { @@ -169,7 +169,7 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) perr = 1; } else if(strstr(s, "sem_timedwait")==s) { pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8)); - snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p[%d sec %d ns])", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), pu32?pu32[0]:-1, pu32?pu32[1]:-1); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p[%d sec %d ns])", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), pu32?pu32[0]:-1, pu32?pu32[1]:-1); perr = 1; } else if(strstr(s, "waitpid")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, 0x%x)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(uint32_t*)from_ptr(R_ESP+12)); @@ -183,15 +183,15 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p[%u/%d/0x%x], %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(int*)from_ptr(R_ESP+4), p16, p16[0], p16[1], p16[2], *(int*)from_ptr(R_ESP+12)); perr = 1; } else if(!strcmp(s, "mmap64")) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %ld)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), *(ulong_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(int*)from_ptr(R_ESP+20), *(int64_t*)from_ptr(R_ESP+24)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %ld)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(ulong_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(int*)from_ptr(R_ESP+20), *(int64_t*)from_ptr(R_ESP+24)); perr = 3; } else if(!strcmp(s, "mmap")) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), *(ulong_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(int*)from_ptr(R_ESP+20), *(int*)from_ptr(R_ESP+24)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(ulong_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(int*)from_ptr(R_ESP+20), *(int*)from_ptr(R_ESP+24)); perr = 3; } else if(strstr(s, "strcasecmp")==s || strstr(s, "__strcasecmp")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(strstr(s, "gtk_signal_connect_full")) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p, %p, %p, %p, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), "gtk_signal_connect_full", *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(void**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20), *(void**)from_ptr(R_ESP+24), *(int32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p, %p, %p, %p, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), "gtk_signal_connect_full", from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(void**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20), *(void**)from_ptr(R_ESP+24), *(int32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32)); } else if(strstr(s, "strcmp")==s || strstr(s, "__strcmp")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(strstr(s, "strstr")==s) { @@ -203,19 +203,19 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); post = 3; } else if(strstr(s, "vsprintf")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(void**)from_ptr(R_ESP+12)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(void**)from_ptr(R_ESP+12)); pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); post = 3; } else if(strstr(s, "__vsprintf_chk")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, %d, %zu, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), *(int*)from_ptr(R_ESP+8), *(size_t*)from_ptr(R_ESP+12), from_ptrv(*(ptr_t*)from_ptr(R_ESP+16)), *(void**)from_ptr(R_ESP+20)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %d, %zu, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int*)from_ptr(R_ESP+8), *(size_t*)from_ptr(R_ESP+12), from_ptrv(*(ptr_t*)from_ptr(R_ESP+16)), *(void**)from_ptr(R_ESP+20)); pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); post = 3; } else if(strstr(s, "__snprintf_chk")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, %d, %d, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), *(size_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), from_ptrv(*(ptr_t*)from_ptr(R_ESP+20)), *(void**)from_ptr(R_ESP+24)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, %d, %d, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(size_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), from_ptrv(*(ptr_t*)from_ptr(R_ESP+20)), *(void**)from_ptr(R_ESP+24)); pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); post = 3; } else if(strstr(s, "snprintf")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), *(size_t*)from_ptr(R_ESP+8), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12))); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(size_t*)from_ptr(R_ESP+8), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12))); pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); post = 3; } else if(strstr(s, "sprintf")==s) { @@ -237,9 +237,9 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) snprintf(buff, 255, "%04d|%p: Calling %s(\"%S\"...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, pu32?((wchar_t*)(pu32)):L"nil"); } else if(strstr(s, "__vswprintf")==s) { if(*(size_t*)from_ptr(R_ESP+12)<2) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, %p, %p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), *(ulong_t*)from_ptr(R_ESP+8), *(void**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, %p, %p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(ulong_t*)from_ptr(R_ESP+8), *(void**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20)); } else { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, \"%S\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), *(ulong_t*)from_ptr(R_ESP+8), *(wchar_t**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, \"%S\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(ulong_t*)from_ptr(R_ESP+8), *(wchar_t**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16)); pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); post = 6; } @@ -258,9 +258,9 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+12)); snprintf(buff, 255, "%04d|%p: Calling %s(%08X, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(uint32_t*)from_ptr(R_ESP+4), pu32?((char*)(pu32)):"nil"); } else if(strstr(s, "vkGetInstanceProcAddr")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(strstr(s, "vkGetDeviceProcAddr")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(strstr(s, "glXGetProcAddress")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))); } else if(strstr(s, "sscanf")==s) { @@ -268,11 +268,14 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) } else if(!strcmp(s, "vsscanf")) { snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(strstr(s, "XCreateWindow")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %d, %d, %u, %u, %u, %d, %u, %p, %u, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(uint32_t*)from_ptr(R_ESP+20), *(uint32_t*)from_ptr(R_ESP+24), *(uint32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32), *(uint32_t*)from_ptr(R_ESP+36), *(void**)from_ptr(R_ESP+40), *(uint32_t*)from_ptr(R_ESP+44), *(void**)from_ptr(R_ESP+48)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %d, %d, %u, %u, %u, %d, %u, %p, %u, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(uint32_t*)from_ptr(R_ESP+20), *(uint32_t*)from_ptr(R_ESP+24), *(uint32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32), *(uint32_t*)from_ptr(R_ESP+36), *(void**)from_ptr(R_ESP+40), *(uint32_t*)from_ptr(R_ESP+44), *(void**)from_ptr(R_ESP+48)); } else if(strstr(s, "XLoadQueryFont")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(strstr(s, "pthread_mutex_lock")==s) { - snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))); + } else if(strstr(s, "pthread_create")==s) { + post = 7; + snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+16))); } else if(!strcmp(s, "fmodf")) { post = 4; snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8)); @@ -281,10 +284,10 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(double*)from_ptr(R_ESP+4), *(double*)from_ptr(R_ESP+12)); } else if(strstr(s, "SDL_GetWindowSurface")==s) { post = 5; - snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))); } else if(strstr(s, "udev_monitor_new_from_netlink")==s) { post = 5; - snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(void**)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); } else if(!strcmp(s, "syscall")) { snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %p, %p...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(void**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16)); perr = 1; @@ -317,6 +320,7 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) break; case 6: snprintf(buff2, 63, "(%S)", pu32?((wchar_t*)pu32):L"nil"); break; + case 7: if(R_EAX) snprintf(buff2, 63, " (error=\"%s\")", strerror(R_EAX)); } if(perr==1 && ((int)R_EAX)<0) snprintf(buff3, 63, " (errno=%d:\"%s\")", errno, strerror(errno)); diff --git a/src/include/myalign32.h b/src/include/myalign32.h index b889f4a4..b7d67016 100755 --- a/src/include/myalign32.h +++ b/src/include/myalign32.h @@ -1,6 +1,7 @@ #ifndef __MY_ALIGN32__H_ #define __MY_ALIGN32__H_ #include <stdint.h> +#include "box32.h" #define X64_VA_MAX_REG (6*8) #define X64_VA_MAX_XMM ((6*8)+(8*16)) @@ -161,6 +162,25 @@ struct i386_statfs64 { uint32_t f_flags; uint32_t f_spare[4]; } __attribute__((packed)); + +struct i386_statvfs64 { + ulong_t f_bsize; + ulong_t f_frsize; + uint64_t f_blocks; + uint64_t f_bfree; + uint64_t f_bavail; + uint64_t f_files; + uint64_t f_ffree; + uint64_t f_favail; + ulong_t f_fsid; + int __f_unused; + ulong_t f_flag; + ulong_t f_namemax; + unsigned int f_type; + int __f_spare[5]; +} __attribute__((packed)); + +void UnalignStatVFS64_32(const void* source, void* dest); #if 0 typedef struct { unsigned char *data; diff --git a/src/libtools/myalign64_32.c b/src/libtools/myalign64_32.c index 0369099e..77418da1 100755 --- a/src/libtools/myalign64_32.c +++ b/src/libtools/myalign64_32.c @@ -4,6 +4,7 @@ #include <stdint.h> #include <asm/stat.h> #include <sys/vfs.h> +#include <sys/statvfs.h> #include "x64emu.h" #include "emu/x64emu_private.h" @@ -77,6 +78,26 @@ void UnalignStatFS64_32(const void* source, void* dest) i386st->f_spare[2] = st->f_spare[2]; i386st->f_spare[3] = st->f_spare[3]; } + +void UnalignStatVFS64_32(const void* source, void* dest) +{ + struct i386_statvfs64 *i386st = (struct i386_statvfs64*)dest; + struct statvfs *st = (struct statvfs*) source; + + i386st->f_bsize = st->f_bsize; + i386st->f_frsize = st->f_frsize; + i386st->f_blocks = st->f_blocks; + i386st->f_bfree = st->f_bfree; + i386st->f_bavail = st->f_bavail; + i386st->f_files = st->f_files; + i386st->f_ffree = st->f_ffree; + i386st->f_favail = st->f_favail; + i386st->f_fsid = st->f_fsid; + i386st->f_flag = st->f_flag; + i386st->f_namemax = st->f_namemax; + i386st->f_type = st->f_type; +} + #define TRANSFERT \ GO(l_type) \ GO(l_whence) \ diff --git a/src/libtools/threads32.c b/src/libtools/threads32.c index bab4cf4f..72229d70 100755 --- a/src/libtools/threads32.c +++ b/src/libtools/threads32.c @@ -490,11 +490,24 @@ static void del_cond(void* cond) } pthread_mutex_t* getAlignedMutex(pthread_mutex_t* m); +EXPORT int my32_pthread_cond_broadcast(x64emu_t* emu, void* cond) +{ + pthread_cond_t * c = get_cond(cond); + return pthread_cond_broadcast(c); +} EXPORT int my32_pthread_cond_broadcast_old(x64emu_t* emu, void* cond) { pthread_cond_t * c = get_cond(cond); return pthread_cond_broadcast(c); } + +EXPORT int my32_pthread_cond_destroy(x64emu_t* emu, void* cond) +{ + pthread_cond_t * c = get_cond(cond); + int ret = pthread_cond_destroy(c); + if(c!=cond) del_cond(cond); + return ret; +} EXPORT int my32_pthread_cond_destroy_old(x64emu_t* emu, void* cond) { pthread_cond_t * c = get_cond(cond); @@ -502,16 +515,29 @@ EXPORT int my32_pthread_cond_destroy_old(x64emu_t* emu, void* cond) if(c!=cond) del_cond(cond); return ret; } + +EXPORT int my32_pthread_cond_init(x64emu_t* emu, void* cond, void* attr) +{ + pthread_cond_t *c = add_cond(cond); + return pthread_cond_init(c, (const pthread_condattr_t*)attr); +} EXPORT int my32_pthread_cond_init_old(x64emu_t* emu, void* cond, void* attr) { pthread_cond_t *c = add_cond(cond); return pthread_cond_init(c, (const pthread_condattr_t*)attr); } + +EXPORT int my32_pthread_cond_signal(x64emu_t* emu, void* cond) +{ + pthread_cond_t * c = get_cond(cond); + return pthread_cond_signal(c); +} EXPORT int my32_pthread_cond_signal_old(x64emu_t* emu, void* cond) { pthread_cond_t * c = get_cond(cond); return pthread_cond_signal(c); } + EXPORT int my32_pthread_cond_timedwait_old(x64emu_t* emu, void* cond, void* mutex, void* abstime) { pthread_cond_t * c = get_cond(cond); @@ -525,11 +551,13 @@ EXPORT int my32_pthread_cond_wait_old(x64emu_t* emu, void* cond, void* mutex) EXPORT int my32_pthread_cond_timedwait(x64emu_t* emu, void* cond, void* mutex, void* abstime) { - return pthread_cond_timedwait((pthread_cond_t*)cond, getAlignedMutex((pthread_mutex_t*)mutex), (const struct timespec*)abstime); + pthread_cond_t * c = get_cond(cond); + return pthread_cond_timedwait(c, getAlignedMutex((pthread_mutex_t*)mutex), (const struct timespec*)abstime); } EXPORT int my32_pthread_cond_wait(x64emu_t* emu, void* cond, void* mutex) { - return pthread_cond_wait((pthread_cond_t*)cond, getAlignedMutex((pthread_mutex_t*)mutex)); + pthread_cond_t * c = get_cond(cond); + return pthread_cond_wait(c, getAlignedMutex((pthread_mutex_t*)mutex)); } EXPORT int my32_pthread_mutexattr_setkind_np(x64emu_t* emu, void* t, int kind) @@ -644,15 +672,14 @@ EXPORT int my32_pthread_attr_setschedpolicy(x64emu_t* emu, void* attr, int p) } EXPORT int my32_pthread_attr_setstackaddr(x64emu_t* emu, void* attr, void* p) { - ulong_t size = 2*1024*1024; - my32_pthread_attr_getstacksize(emu, attr, &size); + size_t size = 2*1024*1024; + void* pp; + pthread_attr_getstack(get_attr(attr), &pp, &size); return pthread_attr_setstack(get_attr(attr), p, size); } EXPORT int my32_pthread_attr_setstacksize(x64emu_t* emu, void* attr, size_t p) { - ptr_t pp; - my32_pthread_attr_getstackaddr(emu, attr, &pp); - return pthread_attr_setstack(get_attr(attr), from_ptrv(pp), p); + return pthread_attr_setstacksize(get_attr(attr), p); } diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index ba60e75b..50b8c8f0 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -2,6 +2,7 @@ #() vFi -> vFi #() vFu -> vFu #() vFp -> vFp +#() vFh -> vFh #() vFA -> vFA #() iFv -> iFv #() iFi -> iFi @@ -87,6 +88,7 @@ #() dFpBp_ -> dFpB #() iFuBLL_ -> iFuB #() iFprLL_ -> iFpB +#() iFrLL_BLL_ -> iFBB #() vFEip -> vFEip #() vFEpi -> vFEpi #() vFEpu -> vFEpu @@ -97,6 +99,7 @@ #() iFEpL -> iFEpL #() iFEpp -> iFEpp #() iFEpV -> iFEpV +#() iFEhp -> iFEhp #() iFiii -> iFiii #() iFiiI -> iFiiI #() iFiiu -> iFiiu @@ -129,6 +132,7 @@ #() pFEpi -> pFEpi #() pFEpp -> pFEpp #() pFpiL -> pFpiL +#() pFpih -> pFpih #() pFppu -> pFppu #() pFppL -> pFppL #() pFpOM -> pFpOM @@ -159,11 +163,14 @@ #() pFEppp -> pFEppp #() pFpiLL -> pFpiLL #() pFppLL -> pFppLL +#() iFEpprLL_ -> iFEppB #() vFEpLLp -> vFEpLLp #() iFEppiV -> iFEppiV #() iFEpppi -> iFEpppi +#() iFEpppp -> iFEpppp #() iFiLLLL -> iFiLLLL #() iFEBh_ppp -> iFEBppp +#() iFEpippp -> iFEpippp #() iFEpuppp -> iFEpuppp #() iFEpLppp -> iFEpLppp #() iFEpLiipV -> iFEpLiipV @@ -199,6 +206,7 @@ wrappedlibc: - LFL: - pFv: - __ctype_b_loc + - __ctype_tolower_loc - __errno_location - pFL: - vFip: @@ -210,6 +218,8 @@ wrappedlibc: - iFpp: - alphasort64 - iFpV: +- iFhp: + - statvfs64 - IFII: - UFUU: - pFip: @@ -231,8 +241,11 @@ wrappedlibc: - vFpppp: - __libc_init - iFiiII: +- iFLLLL: - iFppiV: +- iFpppp: - iFhvpV: +- iFpippp: - iFpLppp: - iFpLiipV: - iFpippppp: @@ -345,8 +358,11 @@ wrappedlibpthread: - __pthread_mutex_unlock - pthread_attr_destroy - pthread_attr_init + - pthread_cond_broadcast - pthread_cond_broadcast@GLIBC_2.0 + - pthread_cond_destroy - pthread_cond_destroy@GLIBC_2.0 + - pthread_cond_signal - pthread_cond_signal@GLIBC_2.0 - pthread_mutex_destroy - pthread_mutex_lock @@ -385,6 +401,7 @@ wrappedlibpthread: - pthread_attr_getstacksize - pthread_attr_setschedparam - pthread_attr_setstackaddr + - pthread_cond_init - pthread_cond_init@GLIBC_2.0 - pthread_cond_wait - pthread_cond_wait@GLIBC_2.0 @@ -410,6 +427,7 @@ wrappedlibpthread: - __pthread_atfork - pthread_atfork - pthread_attr_getstack +- iFppLL: - pthread_cond_timedwait - pthread_cond_timedwait@GLIBC_2.0 - iFhppp: diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h index 01a5c918..21801fad 100644 --- a/src/wrapped32/generated/wrappedlibctypes32.h +++ b/src/wrapped32/generated/wrappedlibctypes32.h @@ -29,6 +29,7 @@ typedef void (*vFpu_t)(void*, uint32_t); typedef int32_t (*iFip_t)(int32_t, void*); typedef int32_t (*iFpp_t)(void*, void*); typedef int32_t (*iFpV_t)(void*, ...); +typedef int32_t (*iFhp_t)(uintptr_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*); @@ -47,8 +48,11 @@ typedef intptr_t (*lFipL_t)(int32_t, void*, uintptr_t); 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 (*iFLLLL_t)(uintptr_t, uintptr_t, uintptr_t, uintptr_t); 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 int32_t (*iFpippp_t)(void*, int32_t, void*, void*, void*); typedef int32_t (*iFpLppp_t)(void*, uintptr_t, void*, void*, void*); typedef int32_t (*iFpLiipV_t)(void*, uintptr_t, int32_t, int32_t, void*, ...); typedef int32_t (*iFpippppp_t)(void*, int32_t, void*, void*, void*, void*, void*); @@ -57,10 +61,12 @@ typedef int32_t (*iFpuvvppp_t)(void*, uint32_t, void, void, void*, void*, void*) #define SUPER() ADDED_FUNCTIONS() \ GO(__close_nocancel, iFi_t) \ GO(__ctype_b_loc, pFv_t) \ + GO(__ctype_tolower_loc, pFv_t) \ GO(__errno_location, pFv_t) \ GO(getrlimit, iFip_t) \ GO(setrlimit, iFip_t) \ GO(alphasort64, iFpp_t) \ + GO(statvfs64, iFhp_t) \ GO(signal, pFip_t) \ GO(localtime_r, pFpp_t) \ GO(__libc_init, vFpppp_t) diff --git a/src/wrapped32/generated/wrappedlibpthreadtypes32.h b/src/wrapped32/generated/wrappedlibpthreadtypes32.h index ca45f0a4..256839dc 100644 --- a/src/wrapped32/generated/wrappedlibpthreadtypes32.h +++ b/src/wrapped32/generated/wrappedlibpthreadtypes32.h @@ -25,6 +25,7 @@ typedef int32_t (*iFpup_t)(void*, uint32_t, void*); typedef int32_t (*iFppu_t)(void*, void*, uint32_t); typedef int32_t (*iFppL_t)(void*, void*, uintptr_t); typedef int32_t (*iFppp_t)(void*, void*, void*); +typedef int32_t (*iFppLL_t)(void*, void*, uintptr_t, uintptr_t); typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); #define SUPER() ADDED_FUNCTIONS() \ @@ -38,8 +39,11 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); GO(__pthread_mutex_unlock, 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) \ @@ -73,6 +77,7 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); 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) \ @@ -92,8 +97,8 @@ typedef int32_t (*iFhppp_t)(uintptr_t, void*, void*, void*); GO(__pthread_atfork, iFppp_t) \ GO(pthread_atfork, iFppp_t) \ GO(pthread_attr_getstack, iFppp_t) \ - GO(pthread_cond_timedwait, iFppp_t) \ - GO(pthread_cond_timedwait@GLIBC_2.0, iFppp_t) \ + GO(pthread_cond_timedwait, iFppLL_t) \ + GO(pthread_cond_timedwait@GLIBC_2.0, iFppLL_t) \ GO(pthread_create, iFhppp_t) #endif // __wrappedlibpthreadTYPES32_H_ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index bd64bfae..e6b9e6b0 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -76,6 +76,7 @@ typedef void (*vFv_t)(void); typedef void (*vFi_t)(int32_t); typedef void (*vFu_t)(uint32_t); typedef void (*vFp_t)(void*); +typedef void (*vFh_t)(uintptr_t); typedef void (*vFA_t)(void*); typedef int32_t (*iFv_t)(void); typedef int32_t (*iFi_t)(int32_t); @@ -161,6 +162,7 @@ typedef float (*fFpBp__t)(void*, struct_p_t*); typedef double (*dFpBp__t)(void*, struct_p_t*); typedef int32_t (*iFuBLL__t)(uint32_t, struct_LL_t*); typedef int32_t (*iFprLL__t)(void*, struct_LL_t*); +typedef int32_t (*iFrLL_BLL__t)(struct_LL_t*, struct_LL_t*); typedef void (*vFEip_t)(x64emu_t*, int32_t, void*); typedef void (*vFEpi_t)(x64emu_t*, void*, int32_t); typedef void (*vFEpu_t)(x64emu_t*, void*, uint32_t); @@ -171,6 +173,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 (*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); typedef int32_t (*iFiiu_t)(int32_t, int32_t, uint32_t); @@ -203,6 +206,7 @@ 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* (*pFpiL_t)(void*, int32_t, uintptr_t); +typedef void* (*pFpih_t)(void*, int32_t, uintptr_t); typedef void* (*pFppu_t)(void*, void*, uint32_t); typedef void* (*pFppL_t)(void*, void*, uintptr_t); typedef void* (*pFpOM_t)(void*, int32_t, ...); @@ -233,11 +237,14 @@ 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 int32_t (*iFEpprLL__t)(x64emu_t*, void*, void*, struct_LL_t*); typedef void (*vFEpLLp_t)(x64emu_t*, void*, uintptr_t, uintptr_t, 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 (*iFiLLLL_t)(int32_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); typedef int32_t (*iFEBh_ppp_t)(x64emu_t*, struct_h_t*, void*, void*, 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 int32_t (*iFEpLiipV_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, void*, void*); @@ -263,6 +270,7 @@ void vFv_32(x64emu_t *emu, uintptr_t fcn) { vFv_t fn = (vFv_t)fcn; fn(); } void vFi_32(x64emu_t *emu, uintptr_t fcn) { vFi_t fn = (vFi_t)fcn; fn(from_ptri(int32_t, R_ESP + 4)); } void vFu_32(x64emu_t *emu, uintptr_t fcn) { vFu_t fn = (vFu_t)fcn; fn(from_ptri(uint32_t, R_ESP + 4)); } void vFp_32(x64emu_t *emu, uintptr_t fcn) { vFp_t fn = (vFp_t)fcn; fn(from_ptriv(R_ESP + 4)); } +void vFh_32(x64emu_t *emu, uintptr_t fcn) { vFh_t fn = (vFh_t)fcn; fn(from_hash(from_ptri(ptr_t, R_ESP + 4))); } void vFA_32(x64emu_t *emu, uintptr_t fcn) { vFA_t fn = (vFA_t)fcn; fn(from_locale_d(from_ptri(ptr_t, R_ESP + 4))); } void iFv_32(x64emu_t *emu, uintptr_t fcn) { iFv_t fn = (iFv_t)fcn; R_EAX = fn(); } void iFi_32(x64emu_t *emu, uintptr_t fcn) { iFi_t fn = (iFi_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4)); } @@ -348,6 +356,7 @@ void fFpBp__32(x64emu_t *emu, uintptr_t fcn) { fFpBp__t fn = (fFpBp__t)fcn; stru 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); } void iFuBLL__32(x64emu_t *emu, uintptr_t fcn) { iFuBLL__t fn = (iFuBLL__t)fcn; struct_LL_t arg_8; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_LL(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void iFprLL__32(x64emu_t *emu, uintptr_t fcn) { iFprLL__t fn = (iFprLL__t)fcn; struct_LL_t arg_8; from_struct_LL(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); } +void iFrLL_BLL__32(x64emu_t *emu, uintptr_t fcn) { iFrLL_BLL__t fn = (iFrLL_BLL__t)fcn; struct_LL_t arg_4; from_struct_LL(&arg_4, *(ptr_t*)(from_ptr((R_ESP + 4)))); struct_LL_t arg_8; R_EAX = fn(*(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_LL(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); } void vFEip_32(x64emu_t *emu, uintptr_t fcn) { vFEip_t fn = (vFEip_t)fcn; fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8)); } void vFEpi_32(x64emu_t *emu, uintptr_t fcn) { vFEpi_t fn = (vFEpi_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8)); } void vFEpu_32(x64emu_t *emu, uintptr_t fcn) { vFEpu_t fn = (vFEpu_t)fcn; fn(emu, from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8)); } @@ -358,6 +367,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 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)); } void iFiiu_32(x64emu_t *emu, uintptr_t fcn) { iFiiu_t fn = (iFiiu_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } @@ -390,6 +400,7 @@ void pFEip_32(x64emu_t *emu, uintptr_t fcn) { pFEip_t fn = (pFEip_t)fcn; R_EAX = 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 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 pFppu_32(x64emu_t *emu, uintptr_t fcn) { pFppu_t fn = (pFppu_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12))); } void pFppL_32(x64emu_t *emu, uintptr_t fcn) { pFppL_t fn = (pFppL_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)))); } void pFpOM_32(x64emu_t *emu, uintptr_t fcn) { pFpOM_t fn = (pFpOM_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), of_convert32(from_ptri(int32_t, R_ESP + 8)), from_ptriv(R_ESP + 12),from_ptriv(R_ESP + 12 + 4))); } @@ -420,11 +431,14 @@ 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 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 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 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 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 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 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 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)); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index 2e754861..fabe8035 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -42,6 +42,7 @@ void vFv_32(x64emu_t *emu, uintptr_t fnc); void vFi_32(x64emu_t *emu, uintptr_t fnc); void vFu_32(x64emu_t *emu, uintptr_t fnc); void vFp_32(x64emu_t *emu, uintptr_t fnc); +void vFh_32(x64emu_t *emu, uintptr_t fnc); void vFA_32(x64emu_t *emu, uintptr_t fnc); void iFv_32(x64emu_t *emu, uintptr_t fnc); void iFi_32(x64emu_t *emu, uintptr_t fnc); @@ -127,6 +128,7 @@ void fFpBp__32(x64emu_t *emu, uintptr_t fnc); void dFpBp__32(x64emu_t *emu, uintptr_t fnc); void iFuBLL__32(x64emu_t *emu, uintptr_t fnc); void iFprLL__32(x64emu_t *emu, uintptr_t fnc); +void iFrLL_BLL__32(x64emu_t *emu, uintptr_t fnc); void vFEip_32(x64emu_t *emu, uintptr_t fnc); void vFEpi_32(x64emu_t *emu, uintptr_t fnc); void vFEpu_32(x64emu_t *emu, uintptr_t fnc); @@ -137,6 +139,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 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); void iFiiu_32(x64emu_t *emu, uintptr_t fnc); @@ -169,6 +172,7 @@ 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 pFpiL_32(x64emu_t *emu, uintptr_t fnc); +void pFpih_32(x64emu_t *emu, uintptr_t fnc); void pFppu_32(x64emu_t *emu, uintptr_t fnc); void pFppL_32(x64emu_t *emu, uintptr_t fnc); void pFpOM_32(x64emu_t *emu, uintptr_t fnc); @@ -199,11 +203,14 @@ 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 iFEpprLL__32(x64emu_t *emu, uintptr_t fnc); void vFEpLLp_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 iFiLLLL_32(x64emu_t *emu, uintptr_t fnc); void iFEBh_ppp_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 iFEpLiipV_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c index fed5a414..85801bda 100755 --- a/src/wrapped32/wrappedlibc.c +++ b/src/wrapped32/wrappedlibc.c @@ -36,6 +36,7 @@ #include <pwd.h> #include <locale.h> #include <sys/resource.h> +#include <sys/statvfs.h> #include "wrappedlibs.h" @@ -433,6 +434,15 @@ static void* findon_exitFct(void* fct) #undef SUPER #endif +EXPORT int my32_statvfs64(x64emu_t* emu, void* f, void* r) +{ + struct statvfs s = {0}; + int ret = statvfs(f, &s); + if(r) + UnalignStatVFS64_32(&s, r); + return ret; +} + // some my32_XXX declare and defines int32_t my32___libc_start_main(x64emu_t* emu, int *(main) (int, char * *, char * *), int argc, char * * ubp_av, void (*init) (void), void (*fini) (void), @@ -906,37 +916,23 @@ EXPORT int my32_vsnprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, voi } EXPORT int my32___vsnprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) __attribute__((alias("my32_vsnprintf"))); EXPORT int my32___vsnprintf_chk(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) __attribute__((alias("my32_vsnprintf"))); -#if 0 EXPORT int my32_vasprintf(x64emu_t* emu, void* strp, void* fmt, void* b, va_list V) { - #ifndef NOALIGN // need to align on arm myStackAlign32((const char*)fmt, (uint32_t*)b, emu->scratch); PREPARE_VALIST_32; - void* f = vasprintf; - int r = ((iFppp_t)f)(strp, fmt, VARARGS_32); + int r = vasprintf(strp, fmt, VARARGS_32); return r; - #else - void* f = vasprintf; - int r = ((iFppp_t)f)(strp, fmt, (uint32_t*)b); - return r; - #endif } EXPORT int my32___vasprintf_chk(x64emu_t* emu, void* strp, int flags, void* fmt, void* b, va_list V) { - #ifndef NOALIGN // need to align on arm myStackAlign32((const char*)fmt, (uint32_t*)b, emu->scratch); PREPARE_VALIST_32; - void* f = vasprintf; - int r = ((iFppp_t)f)(strp, fmt, VARARGS_32); + int r = vasprintf(strp, fmt, VARARGS_32); return r; - #else - void* f = vasprintf; - int r = ((iFppp_t)f)(strp, fmt, (uint32_t*)b); - return r; - #endif } +#if 0 EXPORT int my32___asprintf_chk(x64emu_t* emu, void* result_ptr, int flags, void* fmt, void* b) { @@ -2309,6 +2305,8 @@ EXPORT int my32_alphasort64(x64emu_t* emu, ptr_t* d1_, ptr_t* d2_) EXPORT void* my32___ctype_b_loc(x64emu_t* emu) { const unsigned short** src =__ctype_b_loc(); + if((uintptr_t)src<0x100000000LL) + return src; if(src != emu->ref_ctype) { memcpy(emu->libctype, &((*src)[-128]), 384*sizeof(short)); emu->ref_ctype = src; @@ -2316,6 +2314,18 @@ EXPORT void* my32___ctype_b_loc(x64emu_t* emu) } return &emu->ctype; } +EXPORT void* my32___ctype_tolower_loc(x64emu_t* emu) +{ + const int** src =__ctype_tolower_loc(); + if((uintptr_t)src<0x100000000LL) + return src; + if(src != emu->ref_tolower) { + memcpy(emu->libctolower, &((*src)[-128]), 384*sizeof(int)); + emu->ref_tolower = src; + emu->tolower = emu->libctolower+128; + } + return &emu->tolower; +} EXPORT struct __processor_model { @@ -2727,14 +2737,14 @@ EXPORT void* my32___libc_dlsym(x64emu_t* emu, void* handle, void* name) #endif // all obstack function defined in obstack.c file void obstackSetup(); -#if 0 + EXPORT int my32_nanosleep(const struct timespec *req, struct timespec *rem) { if(!req) return 0; // workaround for some strange calls return nanosleep(req, rem); } -#endif + // wrapped malloc using calloc, it seems x86 malloc set alloc'd block to zero somehow EXPORT void* my32_malloc(unsigned long size) { diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h index ad6ff146..3153d617 100755 --- a/src/wrapped32/wrappedlibc_private.h +++ b/src/wrapped32/wrappedlibc_private.h @@ -5,6 +5,7 @@ // FILE* is h (because stdin/stdout/stderr might be 64bits, maybe other special file can be too) // locale_t needs special handling, with to_locale / from_locale (and is a / A) // struct utimbuf is: LL +// struct timespec is: LL // struct tm is: iiiiiiiiilt // a64l @@ -171,7 +172,7 @@ GO(closelog, vFv) GOM(__ctype_b_loc, pFEv) //GOW(__ctype_get_mb_cur_max, LFv) //DATAM(__ctype_tolower, 4) -//GO(__ctype_tolower_loc, pFv) +GOM(__ctype_tolower_loc, pFEv) //DATAM(__ctype_toupper, 4) //GO(__ctype_toupper_loc, pFv) // __curbrk // type B @@ -328,7 +329,7 @@ GOW(fgetc_unlocked, iFh) //GO(fgetpos64, iFpp) // fgetpwent // fgetpwent_r // Weak -//GOW(fgets, pFpip) +GOW(fgets, pFpih) //GO(__fgets_chk, pFpuip) // fgetspent // fgetspent_r // Weak @@ -1080,7 +1081,7 @@ GOW(mallopt, iFii) // Weak //GOW(memalign, pFLL) //DATAV(__memalign_hook, 4) //GOW(memccpy, pFppiL) -//GO(memchr, pFpiL) +GO(memchr, pFpiL) GO(memcmp, iFppL) GO(memcpy, pFppL) GO(__memcpy_chk, pFppLL) @@ -1134,7 +1135,7 @@ GOW(mkdir, iFpu) //GO(munlockall, iFv) //GOM(munmap, iFEpL) //%% // muntrace -//GOWM(nanosleep, iFpp) //%%,noE +GOWM(nanosleep, iFrLL_BLL_) //%%,noE // __nanosleep // Weak // netname2host // netname2user @@ -1395,7 +1396,7 @@ GO(__res_init, iFv) //GO(__res_state, pFv) //DATA(re_syntax_options, 4) // type B // revoke -//GO(rewind, vFp) +GO(rewind, vFh) //GO(rewinddir, vFp) // rexec // rexec_af @@ -1594,7 +1595,7 @@ GOM(__stack_chk_fail, vFEv) //%% // __statfs //GOWM(statfs64, iFpp) //%%,noE //GO(statvfs, iFpp) -//GOW(statvfs64, iFpp) // is alignment ok? +GOWM(statvfs64, iFEhp) DATAM(stderr, 4) DATAM(stdin, 4) DATAM(stdout, 4) @@ -1658,7 +1659,7 @@ GO(strncmp, iFppL) // __strpbrk_c3 //GO(strptime, pFppp) // strptime_l // Weak -//GO(strrchr, pFpi) +GO(strrchr, pFpi) //GOW(strsep, pFpp) // __strsep_1c // __strsep_2c @@ -1669,7 +1670,7 @@ GO(strncmp, iFppL) // __strspn_c1 // __strspn_c2 // __strspn_c3 -//GO(strstr, pFpp) +GO(strstr, pFpp) GO(strtod, dFpBp_) //GO(__strtod_internal, dFppi) //GO(__strtod_l, dFppp) @@ -1868,8 +1869,8 @@ GO(utime, iFprLL_) //GOW(utmpname, iFp) // utmpxname //GOW(valloc, pFu) -//GOM(vasprintf, iFEpppp) //%% -//GOM(__vasprintf_chk, iFEpippp) //%% +GOM(vasprintf, iFEpppp) //%% +GOM(__vasprintf_chk, iFEpippp) //%% // vdprintf // Weak // __vdprintf_chk //GOM(verr, vFEpV) //%% diff --git a/src/wrapped32/wrappedlibpthread_private.h b/src/wrapped32/wrappedlibpthread_private.h index 6f44c733..933f8489 100755 --- a/src/wrapped32/wrappedlibpthread_private.h +++ b/src/wrapped32/wrappedlibpthread_private.h @@ -3,6 +3,7 @@ #endif // General note: pthread_t is unsigned long int // cpu_set_t is a struct with an array, default size is fixed for all architecture +// struct timespec is: LL // __errno_location // fork @@ -61,13 +62,13 @@ 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, iFEppp, my32_pthread_cond_timedwait_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) -GO(pthread_cond_broadcast, iFp) -GO(pthread_cond_destroy, iFp) -GO(pthread_cond_init, iFpp) -GO(pthread_cond_signal, iFp) -GOM(pthread_cond_timedwait, iFEppp) +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) |