Use wut 1.1.1

This commit is contained in:
Maschell 2022-08-08 11:45:02 +02:00
parent 4cbef0137c
commit d2f071a9ae
4 changed files with 43 additions and 5 deletions

View File

@ -1,3 +1,3 @@
FROM wiiuenv/devkitppc:20211229
FROM wiiuenv/devkitppc:20220806
WORKDIR project

36
src/crt.c Normal file
View File

@ -0,0 +1,36 @@
void __init_wut_malloc();
void __init_wut_newlib();
void __init_wut_stdcpp();
void __init_wut_devoptab();
void __attribute__((weak)) __init_wut_socket();
void __fini_wut_malloc();
void __fini_wut_newlib();
void __fini_wut_stdcpp();
void __fini_wut_devoptab();
void __attribute__((weak)) __fini_wut_socket();
void __attribute__((weak))
init_wut() {
__init_wut_malloc();
__init_wut_newlib();
__init_wut_stdcpp();
__init_wut_devoptab();
if (&__init_wut_socket) __init_wut_socket();
}
void __attribute__((weak))
fini_wut() {
__fini_wut_devoptab();
__fini_wut_stdcpp();
__fini_wut_newlib();
__fini_wut_malloc();
}

View File

@ -58,6 +58,7 @@ IMPORT(OSCompareAndSwapAtomic);
IMPORT(OSGetThreadSpecific);
IMPORT(OSSetThreadSpecific);
IMPORT(OSReport);
IMPORT(OSSwapAtomic);
IMPORT(exit);
IMPORT(_Exit);
@ -92,6 +93,7 @@ IMPORT(FSChangeDir);
IMPORT(FSGetFreeSpaceSize);
IMPORT(FSGetStat);
IMPORT(FSRemove);
IMPORT(FSOpenFileEx);
IMPORT(FSOpenFile);
IMPORT(FSCloseFile);
IMPORT(FSOpenDir);

View File

@ -41,8 +41,8 @@ std::map<std::string, std::string> get_all_payloads(const char *relativefilepath
std::string PayloadSelectionScreen(const std::map<std::string, std::string> &payloads);
extern "C" void __init_wut();
extern "C" void __fini_wut();
extern "C" void init_wut();
extern "C" void fini_wut();
MEMExpHeapBlock *memory_start = nullptr;
extern "C" uint32_t start_wrapper(int argc, char **argv) {
@ -54,7 +54,7 @@ extern "C" uint32_t start_wrapper(int argc, char **argv) {
auto heap = (MEMExpHeap *) mem2_heap_handle;
memory_start = heap->usedList.tail;
__init_wut();
init_wut();
WHBLogUdpInit();
WHBLogCafeInit();
@ -88,7 +88,7 @@ extern "C" uint32_t start_wrapper(int argc, char **argv) {
WHBLogUdpDeinit();
WHBLogCafeDeinit();
__fini_wut();
fini_wut();
revertKernelHook();