about summary refs log tree commit diff stats
path: root/src/wrapped32
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-12-24 01:43:47 +0800
committerGitHub <noreply@github.com>2024-12-23 18:43:47 +0100
commit13ee4acd59ddf1cf35666ee06c8ecff44b7bfb1a (patch)
tree0aa340380d019919db76399a17b640595818cc08 /src/wrapped32
parent1360e7112c8a027dd7e1a6cdd7942d1038aa54f2 (diff)
downloadbox64-13ee4acd59ddf1cf35666ee06c8ecff44b7bfb1a.tar.gz
box64-13ee4acd59ddf1cf35666ee06c8ecff44b7bfb1a.zip
[WRAPPED][BOX32] Redirected a few old symbols (#2194)
* [WRAPPED] Redirected a few old symbols

* More
Diffstat (limited to 'src/wrapped32')
-rw-r--r--src/wrapped32/generated/functions_list.txt8
-rw-r--r--src/wrapped32/generated/wrappedlibctypes32.h2
-rw-r--r--src/wrapped32/generated/wrappedlibresolvtypes32.h6
-rw-r--r--src/wrapped32/generated/wrapper32.c4
-rw-r--r--src/wrapped32/generated/wrapper32.h2
-rwxr-xr-xsrc/wrapped32/wrappedlibc.c4
-rwxr-xr-xsrc/wrapped32/wrappedlibc_private.h2
-rw-r--r--src/wrapped32/wrappedlibresolv_private.h4
8 files changed, 24 insertions, 8 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index 3f40c384..820250ff 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -910,7 +910,6 @@
 #() iEipii -> iEipii
 #() iEipip -> iEipip
 #() iEipui -> iEipui
-#() iEipup -> iEipup
 #() iFipup -> iFipup
 #() iFipLp -> iFipLp
 #() iEippi -> iEippi
@@ -1198,6 +1197,7 @@
 #() iEEiipV -> iEEiipV
 #() iEEipii -> iEEipii
 #() iEEipuu -> iEEipuu
+#() iEEipup -> iEEipup
 #() iEEippL -> iEEippL
 #() iEEuupi -> iEEuupi
 #() iEEpipp -> iEEpipp
@@ -2110,6 +2110,8 @@ wrappedlibc:
 - iEipii:
 - iEipuu:
   - sendmmsg
+- iEipup:
+  - __xmknod
 - iEippi:
   - utimensat
 - iEippL:
@@ -2434,6 +2436,10 @@ wrappedlibresolv:
   - res_search
 - iFpiipi:
   - __res_search
+- iFppppi:
+  - __dn_expand
+- iFppiipi:
+  - __res_nquery
 wrappedlibrt:
 - iEuBLL_:
   - __clock_gettime
diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h
index ef6b1621..de0d6910 100644
--- a/src/wrapped32/generated/wrappedlibctypes32.h
+++ b/src/wrapped32/generated/wrappedlibctypes32.h
@@ -103,6 +103,7 @@ typedef int32_t (*iEiiip_t)(int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iEiipV_t)(int32_t, int32_t, void*, ...);
 typedef int32_t (*iEipii_t)(int32_t, void*, int32_t, int32_t);
 typedef int32_t (*iEipuu_t)(int32_t, void*, uint32_t, uint32_t);
+typedef int32_t (*iEipup_t)(int32_t, void*, uint32_t, void*);
 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 (*iEuupi_t)(uint32_t, uint32_t, void*, int32_t);
@@ -232,6 +233,7 @@ typedef int32_t (*iFpuippupp_t)(void*, uint32_t, int32_t, void*, void*, uint32_t
 	GO(__vsyslog_chk, vEiipp_t) \
 	GO(__syslog_chk, vEiipV_t) \
 	GO(sendmmsg, iEipuu_t) \
+	GO(__xmknod, iEipup_t) \
 	GO(utimensat, iEippi_t) \
 	GO(readlinkat, iEippL_t) \
 	GO(waitid, iEuupi_t) \
diff --git a/src/wrapped32/generated/wrappedlibresolvtypes32.h b/src/wrapped32/generated/wrappedlibresolvtypes32.h
index 0668da67..3501297d 100644
--- a/src/wrapped32/generated/wrappedlibresolvtypes32.h
+++ b/src/wrapped32/generated/wrappedlibresolvtypes32.h
@@ -15,6 +15,8 @@ typedef int32_t (*iFpip_t)(void*, int32_t, void*);
 typedef int32_t (*iFpuip_t)(void*, uint32_t, int32_t, void*);
 typedef int32_t (*iEpiipi_t)(void*, int32_t, int32_t, void*, int32_t);
 typedef int32_t (*iFpiipi_t)(void*, int32_t, int32_t, void*, int32_t);
+typedef int32_t (*iFppppi_t)(void*, void*, void*, void*, int32_t);
+typedef int32_t (*iFppiipi_t)(void*, void*, int32_t, int32_t, void*, int32_t);
 
 #define SUPER() ADDED_FUNCTIONS() \
 	GO(ns_initparse, iFpip_t) \
@@ -22,6 +24,8 @@ typedef int32_t (*iFpiipi_t)(void*, int32_t, int32_t, void*, int32_t);
 	GO(__res_query, iEpiipi_t) \
 	GO(res_query, iEpiipi_t) \
 	GO(res_search, iEpiipi_t) \
-	GO(__res_search, iFpiipi_t)
+	GO(__res_search, iFpiipi_t) \
+	GO(__dn_expand, iFppppi_t) \
+	GO(__res_nquery, iFppiipi_t)
 
 #endif // __wrappedlibresolvTYPES32_H_
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index a6e0b8c2..4ae67aa8 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -1004,7 +1004,6 @@ typedef int32_t (*iFiLpL_t)(int32_t, uintptr_t, void*, uintptr_t);
 typedef int32_t (*iEipii_t)(int32_t, void*, int32_t, int32_t);
 typedef int32_t (*iEipip_t)(int32_t, void*, int32_t, void*);
 typedef int32_t (*iEipui_t)(int32_t, void*, uint32_t, int32_t);
-typedef int32_t (*iEipup_t)(int32_t, void*, uint32_t, void*);
 typedef int32_t (*iFipup_t)(int32_t, void*, uint32_t, void*);
 typedef int32_t (*iFipLp_t)(int32_t, void*, uintptr_t, void*);
 typedef int32_t (*iEippi_t)(int32_t, void*, void*, int32_t);
@@ -1292,6 +1291,7 @@ typedef int32_t (*iEEiiip_t)(x64emu_t*, int32_t, int32_t, int32_t, void*);
 typedef int32_t (*iEEiipV_t)(x64emu_t*, int32_t, int32_t, void*, void*);
 typedef int32_t (*iEEipii_t)(x64emu_t*, int32_t, void*, int32_t, int32_t);
 typedef int32_t (*iEEipuu_t)(x64emu_t*, int32_t, void*, uint32_t, uint32_t);
+typedef int32_t (*iEEipup_t)(x64emu_t*, int32_t, void*, uint32_t, void*);
 typedef int32_t (*iEEippL_t)(x64emu_t*, int32_t, void*, void*, uintptr_t);
 typedef int32_t (*iEEuupi_t)(x64emu_t*, uint32_t, uint32_t, void*, int32_t);
 typedef int32_t (*iEEpipp_t)(x64emu_t*, void*, int32_t, void*, void*);
@@ -2809,7 +2809,6 @@ void iFiLpL_32(x64emu_t *emu, uintptr_t fcn) { iFiLpL_t fn = (iFiLpL_t)fcn; R_EA
 void iEipii_32(x64emu_t *emu, uintptr_t fcn) { iEipii_t fn = (iEipii_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); emu->libc_err = errno; }
 void iEipip_32(x64emu_t *emu, uintptr_t fcn) { iEipip_t fn = (iEipip_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); emu->libc_err = errno; }
 void iEipui_32(x64emu_t *emu, uintptr_t fcn) { iEipui_t fn = (iEipui_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); emu->libc_err = errno; }
-void iEipup_32(x64emu_t *emu, uintptr_t fcn) { iEipup_t fn = (iEipup_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); emu->libc_err = errno; }
 void iFipup_32(x64emu_t *emu, uintptr_t fcn) { iFipup_t fn = (iFipup_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); }
 void iFipLp_32(x64emu_t *emu, uintptr_t fcn) { iFipLp_t fn = (iFipLp_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); }
 void iEippi_32(x64emu_t *emu, uintptr_t fcn) { iEippi_t fn = (iEippi_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); emu->libc_err = errno; }
@@ -3097,6 +3096,7 @@ void iEEiiip_32(x64emu_t *emu, uintptr_t fcn) { iEEiiip_t fn = (iEEiiip_t)fcn; e
 void iEEiipV_32(x64emu_t *emu, uintptr_t fcn) { iEEiipV_t fn = (iEEiipV_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptrv(R_ESP + 16)); emu->libc_err = errno; }
 void iEEipii_32(x64emu_t *emu, uintptr_t fcn) { iEEipii_t fn = (iEEipii_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); emu->libc_err = errno; }
 void iEEipuu_32(x64emu_t *emu, uintptr_t fcn) { iEEipuu_t fn = (iEEipuu_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16)); emu->libc_err = errno; }
+void iEEipup_32(x64emu_t *emu, uintptr_t fcn) { iEEipup_t fn = (iEEipup_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); emu->libc_err = errno; }
 void iEEippL_32(x64emu_t *emu, uintptr_t fcn) { iEEippL_t fn = (iEEippL_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16))); emu->libc_err = errno; }
 void iEEuupi_32(x64emu_t *emu, uintptr_t fcn) { iEEuupi_t fn = (iEEuupi_t)fcn; errno = emu->libc_err; R_EAX = fn(emu, from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); emu->libc_err = errno; }
 void iEEpipp_32(x64emu_t *emu, uintptr_t fcn) { iEEpipp_t fn = (iEEpipp_t)fcn; errno = emu->libc_err; 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)); emu->libc_err = errno; }
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index 3da70e46..54508012 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -951,7 +951,6 @@ void iFiLpL_32(x64emu_t *emu, uintptr_t fnc);
 void iEipii_32(x64emu_t *emu, uintptr_t fnc);
 void iEipip_32(x64emu_t *emu, uintptr_t fnc);
 void iEipui_32(x64emu_t *emu, uintptr_t fnc);
-void iEipup_32(x64emu_t *emu, uintptr_t fnc);
 void iFipup_32(x64emu_t *emu, uintptr_t fnc);
 void iFipLp_32(x64emu_t *emu, uintptr_t fnc);
 void iEippi_32(x64emu_t *emu, uintptr_t fnc);
@@ -1239,6 +1238,7 @@ void iEEiiip_32(x64emu_t *emu, uintptr_t fnc);
 void iEEiipV_32(x64emu_t *emu, uintptr_t fnc);
 void iEEipii_32(x64emu_t *emu, uintptr_t fnc);
 void iEEipuu_32(x64emu_t *emu, uintptr_t fnc);
+void iEEipup_32(x64emu_t *emu, uintptr_t fnc);
 void iEEippL_32(x64emu_t *emu, uintptr_t fnc);
 void iEEuupi_32(x64emu_t *emu, uintptr_t fnc);
 void iEEpipp_32(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c
index bd649363..7ddf8545 100755
--- a/src/wrapped32/wrappedlibc.c
+++ b/src/wrapped32/wrappedlibc.c
@@ -521,6 +521,10 @@ void EXPORT my32___stack_chk_fail(x64emu_t* emu)
     print_cycle_log(LOG_INFO);
     StopEmu(emu, buff, 1);
 }
+int EXPORT my32___xmknod(x64emu_t* emu, int ver, const char* path, mode_t mode, dev_t* dev)
+{
+    return mknod(path, mode, *dev);
+}
 void EXPORT my32___gmon_start__(x64emu_t *emu)
 {
     printf_log(LOG_DEBUG, "__gmon_start__ called (dummy call)\n");
diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h
index 72b8ada8..e4eefbdf 100755
--- a/src/wrapped32/wrappedlibc_private.h
+++ b/src/wrapped32/wrappedlibc_private.h
@@ -2141,7 +2141,7 @@ GO(xdr_u_int, iEpp)
 GO(xdr_void, iEv)
 // xdr_wrapstring
 // xencrypt
-GO(__xmknod, iEipup)
+GOM(__xmknod, iEEipup)
 //GO(__xmknodat, iEiipip)
 GO(__xpg_basename, tEp)
 // __xpg_sigpause   // Weak
diff --git a/src/wrapped32/wrappedlibresolv_private.h b/src/wrapped32/wrappedlibresolv_private.h
index 00ef733d..5ddea5fd 100644
--- a/src/wrapped32/wrappedlibresolv_private.h
+++ b/src/wrapped32/wrappedlibresolv_private.h
@@ -6,7 +6,7 @@
 //GO(__b64_pton, iFppL)
 //GO(__dn_comp, iFppipp)
 //GO(__dn_count_labels, iFp)
-GO(__dn_expand, iFppppi)
+GO2(__dn_expand, iFppppi, dn_expand)
 //GOW(dn_expand, iFppppi)
 //GO(__dn_skipname, iFpp)
 //GO(__fp_nquery, vFpiS)
@@ -85,7 +85,7 @@ GOM(ns_parserr, iFEpuip)
 //GOW(res_mkquery, iFipiipippi)
 //GO(__res_nameinquery, iFpiipp)
 //GO(__res_nmkquery, 
-GO(__res_nquery, iFppiipi)
+GO2(__res_nquery, iFppiipi, res_nquery)
 //GO(__res_nquerydomain, 
 //GO(__res_nsearch, iFppiipi)
 //GO(__res_nsend,