repo structure overhaul

This commit is contained in:
Prakxo
2023-12-09 13:34:31 +01:00
parent f0d30c4e77
commit 4b8cf4324a
349 changed files with 204 additions and 662 deletions
+44
View File
@@ -0,0 +1,44 @@
#include "executor.h"
#include "dolphin/os/__ppc_eabi_init.h"
#include "dolphin/os.h"
#include "dolphin/os/OSContext.h"
#include "terminal.h"
#include "main.h"
BOOL construct_skip;
void _prolog() {
voidfunctionptr *constructor;
/* call static initializers */
if (!construct_skip) {
for (constructor = _ctors; *constructor; constructor++) {
(*constructor)();
}
}
foresta_main();
}
void _epilog() {
voidfunctionptr *destructor;
/* call static destructors */
for (destructor = _dtors; *destructor; destructor++) {
(*destructor)();
}
}
void _unresolved() {
u32 i;
u32* p;
OSReport(VT_COL(RED, WHITE) "\nError: A called an unlinked function.\n");
OSReport("Address: Back Chain LR Save\n");
for (i = 0, p = (u32*)OSGetStackPointer(); p && (u32)p != 0xffffffff && i++ < 16; p = (u32*)*p) {
OSReport("0x%08x: 0x%08x 0x%08x\n", p, p[0], p[1]);
}
OSReport("\n" VT_RST "\n");
}