Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WRAPPED] Removed GOS, renamed GODW into GOWD #1797

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rebuild_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def add_symbol_name(funname: Union[str, None], funsname: Dict[ClausesStr, List[s
gbl[str(dependants)].append(FunctionType(ln))

if any(c in origLine for c in depends_on_ld):
if (gotype != "GOM") and (gotype != "GOWM") and (gotype != "GOD") and (gotype != "GODW"):
if (gotype != "GOM") and (gotype != "GOWM") and (gotype != "GOD") and (gotype != "GOWD"):
print("\033[91mError:\033[m type depends on HAVE_LD80BITS but the GO type doesn't support that ({0}:{1})"
.format(filename, line[:-1]))
halt_required = True
Expand Down
2 changes: 1 addition & 1 deletion src/wrapped/wrappedandroidsupport_private.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA) && defined(GOS))
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
#error Meh...
#endif

2 changes: 1 addition & 1 deletion src/wrapped/wrappediconv_private.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA) && defined(GOS))
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
#error Meh...
#endif

33 changes: 3 additions & 30 deletions src/wrapped/wrappedlib_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#endif
// regular symbol mapped to itself or another one (depending on HAVE_LD80BITS), but weak
#ifdef HAVE_LD80BITS
#define GODW(N, W, O) GOW(N, W)
#define GOWD(N, W, O) GOW(N, W)
#else
#define GODW(N, W, O) GOW2(N, W, O)
#define GOWD(N, W, O) GOW2(N, W, O)
#endif

// regular symbol mapped to itself
Expand All @@ -41,8 +41,6 @@
#define GOM(N, W)
// symbol mapped to my_symbol, but weak
#define GOWM(N, W)
// regular symbol mapped to itself, that returns a structure
#define GOS(N, W)
// symbol mapped to another one
#define GO2(N, W, O)
// symbol mapped to another one, but weak
Expand Down Expand Up @@ -87,21 +85,10 @@ static const map_onesymbol_t MAPNAME(mysymbolmap)[] = {
};
#undef GOM
#undef GOWM
#undef GOS
#define GOM(N, W)
#define GOWM(N, W)
#ifdef STATICBUILD
#define GOS(N, W) {#N, W, 0, &my_##N},
#else
#define GOS(N, W) {#N, W, 0},
#endif
static const map_onesymbol_t MAPNAME(stsymbolmap)[] = {
#include PRIVATE(LIBNAME)
};
#undef GOS
#undef GO2
#undef GOW2
#define GOS(N, W)
#ifdef STATICBUILD
#define GO2(N, W, O) {#N, W, 0, #O, &O},
#define GOW2(N, W, O) {#N, W, 1, #O, &O},
Expand Down Expand Up @@ -150,12 +137,11 @@ static const map_onedata_t MAPNAME(mydatamap)[] = {
#undef GO
#undef GOW
#undef GOD
#undef GODW
#undef GOWD
#undef GOM
#undef GOWM
#undef GO2
#undef GOW2
#undef GOS
#undef DATA
#undef DATAV
#undef DATAB
Expand Down Expand Up @@ -255,19 +241,6 @@ int FUNC(_init)(library_t* lib, box64context_t* box64)
DOIT(symbolmap)
DOIT(mysymbolmap)
#undef DOIT
cnt = sizeof(MAPNAME(stsymbolmap))/sizeof(map_onesymbol_t);
for (int i=0; i<cnt; ++i) {
k = kh_put(symbolmap, lib->w.stsymbolmap, MAPNAME(stsymbolmap)[i].name, &ret);
kh_value(lib->w.stsymbolmap, k).w = MAPNAME(stsymbolmap)[i].w;
#ifdef STATICBUILD
kh_value(lib->w.stsymbolmap, k).resolved = 1;
kh_value(lib->w.stsymbolmap, k).addr = (uintptr_t)MAPNAME(stsymbolmap)[i].addr;
#else
kh_value(lib->w.stsymbolmap, k).resolved = 0;
#endif
if(strchr(MAPNAME(stsymbolmap)[i].name, '@'))
AddDictionnary(box64->versym, MAPNAME(stsymbolmap)[i].name);
}
cnt = sizeof(MAPNAME(symbol2map))/sizeof(map_onesymbol2_t);
for (int i=0; i<cnt; ++i) {
k = kh_put(symbol2map, lib->w.symbol2map, MAPNAME(symbol2map)[i].name, &ret);
Expand Down
26 changes: 13 additions & 13 deletions src/wrapped/wrappedlibc_private.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA) && defined(GOS))
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
#error Meh...
#endif

Expand Down Expand Up @@ -182,7 +182,7 @@ GO(copy_file_range, lFipipLu)
//GO(__copy_grp,
GOW(copysign, dFdd)
GOW(copysignf, fFff)
GODW(copysignl, DFDD, copysign)
GOWD(copysignl, DFDD, copysign)
GOW(creat, iFpu)
GOW(creat64, iFpu)
//GO(create_module,
Expand Down Expand Up @@ -394,7 +394,7 @@ GOW(finite, iFd)
GO(__finitef, iFf)
GOW(finitef, iFf)
GOD(__finitel, iFD, __finite)
GODW(finitel, iFD, finite)
GOWD(finitel, iFD, finite)
GO(__flbf, iFp)
GO(flistxattr, lFipL)
GOW(flock, iFii)
Expand Down Expand Up @@ -439,7 +439,7 @@ GO(freopen, pFppp)
GO(freopen64, pFppp)
GOW(frexp, dFdp)
GOW(frexpf, fFfp)
GODW(frexpl, DFDp, frexp)
GOWD(frexpl, DFDp, frexp)
GOM(fscanf, iFEppV)
GO(fseek, iFpli)
GO(fseeko, iFpIi)
Expand Down Expand Up @@ -964,7 +964,7 @@ GOW(isinf, iFd)
GO(__isinff, iFf)
GOW(isinff, iFf)
GOD(__isinfl, iFD, __isinf)
GODW(isinfl, iFD, isinf)
GOWD(isinfl, iFD, isinf)
GO(islower, iFi)
//GO(__islower_l,
//GOW(islower_l, iFi!)
Expand All @@ -973,7 +973,7 @@ GOW(isnan, iFd)
GO(__isnanf, iFf)
GOW(isnanf, iFf)
GOD(__isnanl, iFD, __isnan)
GODW(isnanl, iFD, isnan)
GOWD(isnanl, iFD, isnan)
GO2(__isoc23_fscanf, iFEppV, my___isoc99_fscanf)
GO2(__isoc23_sscanf, iFEppV, my___isoc99_sscanf)
GO2(__isoc23_strtol, lFppi, strtol)
Expand Down Expand Up @@ -1081,7 +1081,7 @@ GO(lcong48, vFp)
GOW(lcong48_r, iFpp)
GOW(ldexp, dFdi)
GOW(ldexpf, fFfi)
GODW(ldexpl, DFDi, ldexp)
GOWD(ldexpl, DFDi, ldexp)
GO(ldiv, HFll)
GOM(lfind, pFEpppLp)
GO(lgetxattr, lFpppL)
Expand Down Expand Up @@ -1257,7 +1257,7 @@ GOWM(mmap, pFEpLiiil)
GOWM(mmap64, pFEpLiiil)
GOW(modf, dFdp)
GOW(modff, fFfp)
GODW(modfl, DFDp, modf)
GOWD(modfl, DFDp, modf)
//GOW(modify_ldt, // Deprecated
//GOW(moncontrol,
//GO(__monstartup,
Expand Down Expand Up @@ -1501,7 +1501,7 @@ GO(pwritev2, lFipili)
GO(pwritev64, lFipil)
GO(pwritev64v2, lFipili)
GOD(qecvt, pFDipp, ecvt)
GODW(qecvt_r, iFDipppL, ecvt_r)
GOWD(qecvt_r, iFDipppL, ecvt_r)
GOD(qfcvt, pFDipp, fcvt)
GOD(qfcvt_r, iFDipppL, fcvt_r)
GOD(qgcvt, pFDip, gcvt)
Expand Down Expand Up @@ -1623,7 +1623,7 @@ GO(__sbrk, pFl)
GO(sbrk, pFl)
GOW(scalbn, dFdi)
GOW(scalbnf, fFfi)
GODW(scalbnl, DFDi, scalbn)
GOWD(scalbnl, DFDi, scalbn)
GOWM(scandir, iFEpppp)
GOWM(scandir64, iFEpppp)
GOWM(scandirat, iFipppp)
Expand Down Expand Up @@ -1909,7 +1909,7 @@ GOW(strtof32x, dFpp)
//GOW(strtof32x_l, dFpp!)
GOW(strtof64, dFpp)
//GOW(strtof64_l, dFpp!)
GODW(strtof64x, DFpp, strtof64)
GOWD(strtof64x, DFpp, strtof64)
//GOW(strtof64x_l, DFpp!)
GO(__strtof_internal, fFppi)
GO(__strtof_l, fFppL)
Expand All @@ -1925,7 +1925,7 @@ GO(strtol, lFppi)
GOD(strtold, DFpp, strtod)
GOD(__strtold_internal, DFppi, __strtod_internal)
GOD(__strtold_l, DFppp, __strtod_l)
GODW(strtold_l, DFppp, strtod_l)
GOWD(strtold_l, DFppp, strtod_l)
//GO(__strtold_nan,
GO(__strtol_internal, lFppii)
GO(__strtol_l, lFppi)
Expand Down Expand Up @@ -2262,7 +2262,7 @@ GOW(wcstof32x, dFpp)
//GOW(wcstof32x_l, dFpp!)
GOW(wcstof64, dFpp)
//GOW(wcstof64_l, dFpp!)
GODW(wcstof64x, DFpp, wcstof64)
GOWD(wcstof64x, DFpp, wcstof64)
//GOW(wcstof64x_l, DFpp!)
//GO(__wcstof_internal,
//GO(__wcstof_l,
Expand Down
Loading