diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-10-25 16:01:28 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-10-25 16:01:28 +0200 |
| commit | bdf0e95a12773d5c2137df80af8c144709aae693 (patch) | |
| tree | 92ac08fa056ba0d25aa953702791b2a3503a4cfe /src | |
| parent | 90674b825a619f71b7b4d13747fd76ad74d5f4f0 (diff) | |
| download | box64-bdf0e95a12773d5c2137df80af8c144709aae693.tar.gz box64-bdf0e95a12773d5c2137df80af8c144709aae693.zip | |
[WRAPPER] Added wrapped libbrotlidec with new warpperhelper (for #1860)
Diffstat (limited to 'src')
| -rw-r--r-- | src/library_list.h | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedbrotlidecdefs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedbrotlidectypes.h | 17 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedbrotlidecundefs.h | 8 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 4 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 1 | ||||
| -rw-r--r-- | src/wrapped/wrappedbrotlidec.c | 37 | ||||
| -rw-r--r-- | src/wrapped/wrappedbrotlidec_private.h | 18 |
9 files changed, 97 insertions, 0 deletions
diff --git a/src/library_list.h b/src/library_list.h index 1142e2c7..63f93b52 100644 --- a/src/library_list.h +++ b/src/library_list.h @@ -267,6 +267,8 @@ GO("libunistring.so.2", libunistring2) GO("libhogweed.so.6", libhogweed6) GO("libsqlite3.so.0", libsqlite3) GO("libtiff.so.5", libtiff5) +GO("libbrotlidec.so", brotlidec) +GO("libbrotlidec.so.1", brotlidec) #ifdef ANDROID GO("libc.so", libc) diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 16962198..aace6c4b 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -1178,6 +1178,7 @@ #() uFifff #() uFuuuu #() uFuppd +#() uFLppp #() uFpiip #() uFpipu #() uFpipL @@ -3307,6 +3308,7 @@ wrappedatspi: - pFppp: - atspi_event_listener_new wrappedayatanaappindicator3: +wrappedbrotlidec: wrappedbz2: - iFp: - BZ2_bzCompressEnd diff --git a/src/wrapped/generated/wrappedbrotlidecdefs.h b/src/wrapped/generated/wrappedbrotlidecdefs.h new file mode 100644 index 00000000..bb881c9b --- /dev/null +++ b/src/wrapped/generated/wrappedbrotlidecdefs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.5.0.24) * + *******************************************************************/ +#ifndef __wrappedbrotlidecDEFS_H_ +#define __wrappedbrotlidecDEFS_H_ + + +#endif // __wrappedbrotlidecDEFS_H_ diff --git a/src/wrapped/generated/wrappedbrotlidectypes.h b/src/wrapped/generated/wrappedbrotlidectypes.h new file mode 100644 index 00000000..9d7f3b4d --- /dev/null +++ b/src/wrapped/generated/wrappedbrotlidectypes.h @@ -0,0 +1,17 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.5.0.24) * + *******************************************************************/ +#ifndef __wrappedbrotlidecTYPES_H_ +#define __wrappedbrotlidecTYPES_H_ + +#ifndef LIBNAME +#error You should only #include this file inside a wrapped*.c file +#endif +#ifndef ADDED_FUNCTIONS +#define ADDED_FUNCTIONS() +#endif + + +#define SUPER() ADDED_FUNCTIONS() + +#endif // __wrappedbrotlidecTYPES_H_ diff --git a/src/wrapped/generated/wrappedbrotlidecundefs.h b/src/wrapped/generated/wrappedbrotlidecundefs.h new file mode 100644 index 00000000..96a27eaf --- /dev/null +++ b/src/wrapped/generated/wrappedbrotlidecundefs.h @@ -0,0 +1,8 @@ +/******************************************************************* + * File automatically generated by rebuild_wrappers.py (v2.5.0.24) * + *******************************************************************/ +#ifndef __wrappedbrotlidecUNDEFS_H_ +#define __wrappedbrotlidecUNDEFS_H_ + + +#endif // __wrappedbrotlidecUNDEFS_H_ diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 34764204..d1aec022 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -1208,6 +1208,7 @@ typedef uint32_t (*uFiiuu_t)(int32_t, int32_t, uint32_t, uint32_t); typedef uint32_t (*uFifff_t)(int32_t, float, float, float); typedef uint32_t (*uFuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t); typedef uint32_t (*uFuppd_t)(uint32_t, void*, void*, double); +typedef uint32_t (*uFLppp_t)(uintptr_t, void*, void*, void*); typedef uint32_t (*uFpiip_t)(void*, int32_t, int32_t, void*); typedef uint32_t (*uFpipu_t)(void*, int32_t, void*, uint32_t); typedef uint32_t (*uFpipL_t)(void*, int32_t, void*, uintptr_t); @@ -4529,6 +4530,7 @@ void uFiiuu(x64emu_t *emu, uintptr_t fcn) { uFiiuu_t fn = (uFiiuu_t)fcn; R_RAX=( void uFifff(x64emu_t *emu, uintptr_t fcn) { uFifff_t fn = (uFifff_t)fcn; R_RAX=(uint32_t)fn((int32_t)R_RDI, emu->xmm[0].f[0], emu->xmm[1].f[0], emu->xmm[2].f[0]); } void uFuuuu(x64emu_t *emu, uintptr_t fcn) { uFuuuu_t fn = (uFuuuu_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (uint32_t)R_RSI, (uint32_t)R_RDX, (uint32_t)R_RCX); } void uFuppd(x64emu_t *emu, uintptr_t fcn) { uFuppd_t fn = (uFuppd_t)fcn; R_RAX=(uint32_t)fn((uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, emu->xmm[0].d[0]); } +void uFLppp(x64emu_t *emu, uintptr_t fcn) { uFLppp_t fn = (uFLppp_t)fcn; R_RAX=(uint32_t)fn((uintptr_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX); } void uFpiip(x64emu_t *emu, uintptr_t fcn) { uFpiip_t fn = (uFpiip_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (void*)R_RCX); } void uFpipu(x64emu_t *emu, uintptr_t fcn) { uFpipu_t fn = (uFpipu_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (uint32_t)R_RCX); } void uFpipL(x64emu_t *emu, uintptr_t fcn) { uFpipL_t fn = (uFpipL_t)fcn; R_RAX=(uint32_t)fn((void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX); } @@ -7633,6 +7635,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &uFifff) return 4; if (fun == &uFuuuu) return 1; if (fun == &uFuppd) return 2; + if (fun == &uFLppp) return 1; if (fun == &uFpiip) return 1; if (fun == &uFpipu) return 1; if (fun == &uFpipL) return 1; @@ -9021,6 +9024,7 @@ int isSimpleWrapper(wrapper_t fun) { if (fun == &CFuuff) return 3; if (fun == &uFuuuu) return 1; if (fun == &uFuppd) return 2; + if (fun == &uFLppp) return 1; if (fun == &uFpCCC) return 1; if (fun == &uFpuup) return 1; if (fun == &uFpupu) return 1; diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index c9844f00..ccd32e9a 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -1215,6 +1215,7 @@ void uFiiuu(x64emu_t *emu, uintptr_t fnc); void uFifff(x64emu_t *emu, uintptr_t fnc); void uFuuuu(x64emu_t *emu, uintptr_t fnc); void uFuppd(x64emu_t *emu, uintptr_t fnc); +void uFLppp(x64emu_t *emu, uintptr_t fnc); void uFpiip(x64emu_t *emu, uintptr_t fnc); void uFpipu(x64emu_t *emu, uintptr_t fnc); void uFpipL(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedbrotlidec.c b/src/wrapped/wrappedbrotlidec.c new file mode 100644 index 00000000..02868917 --- /dev/null +++ b/src/wrapped/wrappedbrotlidec.c @@ -0,0 +1,37 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include <dlfcn.h> +#include <stdarg.h> + +#include "wrappedlibs.h" + +#include "wrapper.h" +#include "bridge.h" +#include "librarian/library_private.h" +#include "x64emu.h" +#include "debug.h" +#include "myalign.h" +#include "callback.h" +#include "emu/x64emu_private.h" + +const char* brotlidecName = "libbrotlidec.so.1"; +#define LIBNAME brotlidec + +#define ADDED_FUNCTIONS() \ + +//#include "generated/wrappedbrotlidectypes.h" + +//#include "wrappercallback.h" + +#define SUPER() \ +GO(0) \ +GO(1) \ +GO(2) \ +GO(3) \ +GO(4) + +#undef SUPER + +#include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedbrotlidec_private.h b/src/wrapped/wrappedbrotlidec_private.h new file mode 100644 index 00000000..b63c3b01 --- /dev/null +++ b/src/wrapped/wrappedbrotlidec_private.h @@ -0,0 +1,18 @@ +#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA)) +#error Meh... +#endif + +GO(BrotliDecoderAttachDictionary, iFpuLp) +//GOM(BrotliDecoderCreateInstance, pFEppp) +GO(BrotliDecoderDecompress, uFLppp) +GO(BrotliDecoderDecompressStream, uFpppppp) +GO(BrotliDecoderDestroyInstance, vFp) +GO(BrotliDecoderErrorString, pFi) +GO(BrotliDecoderGetErrorCode, iFp) +GO(BrotliDecoderHasMoreOutput, iFp) +GO(BrotliDecoderIsFinished, iFp) +GO(BrotliDecoderIsUsed, iFp) +//GOM(BrotliDecoderSetMetadataCallbacks, vFEpppp) +GO(BrotliDecoderSetParameter, iFpuu) +GO(BrotliDecoderTakeOutput, pFpp) +GO(BrotliDecoderVersion, uFv) |