some MSL_C work (#192)

* wip

* bunch of MSL_C files

thanks to pikmin2 decomp for their work

* format / asm

* progress

* fix

* fix remove-asm to work with C files

* init / start
This commit is contained in:
TakaRikka
2022-04-24 04:02:50 -07:00
committed by GitHub
parent a1099217d6
commit 589cc12296
154 changed files with 2388 additions and 3088 deletions
+25
View File
@@ -3,6 +3,8 @@
// this helps remove useless error from the linter when using vscode.
#ifndef IN_VSCODE_EDITOR
#ifdef __cplusplus
#define SECTION_INIT extern "C" __declspec(section ".init")
#define SECTION_RODATA __declspec(section ".rodata")
#define SECTION_DATA __declspec(section ".data")
@@ -23,6 +25,29 @@
#define COMPILER_STRIP_GATE(NAME, VALUE) SECTION_DEAD void* const cg_##NAME = (void*)(VALUE)
#define ALIGN_DECL(ALIGNMENT) __attribute__((aligned(ALIGNMENT)))
#define REGISTER_CTORS(ADDR, FUNCTION) SECTION_CTORS void* const _ctors_##ADDR = (void*)(FUNCTION);
#else
#define SECTION_INIT __declspec(section ".init")
#define SECTION_RODATA __declspec(section ".rodata")
#define SECTION_DATA __declspec(section ".data")
#define SECTION_SDATA __declspec(section ".sdata")
#define SECTION_SDATA2 __declspec(section ".sdata2")
#define SECTION_BSS __declspec(section ".data")
#define SECTION_SBSS __declspec(section ".sdata")
#define SECTION_SBSS2 __declspec(section ".sdata2")
#define SECTION_CTORS __declspec(section ".ctors")
#define SECTION_DTORS __declspec(section ".dtors")
#define SECTION_EXTAB __declspec(section "extab_")
#define SECTION_EXTABINDEX __declspec(section "extabindex_")
#define SECTION_DEAD __declspec(section ".dead")
#define SECTION_CTORS10 __declspec(section ".ctors$10")
#define SECTION_CTORS15 __declspec(section ".ctors$15")
#define SECTION_DTORS10 __declspec(section ".dtors$10")
#define SECTION_DTORS15 __declspec(section ".dtors$15")
#define COMPILER_STRIP_GATE(NAME, VALUE) SECTION_DEAD void* const cg_##NAME = (void*)(VALUE)
#define ALIGN_DECL(ALIGNMENT) __attribute__((aligned(ALIGNMENT)))
#define REGISTER_CTORS(ADDR, FUNCTION) SECTION_CTORS void* const _ctors_##ADDR = (void*)(FUNCTION);
#endif
#else
#define SECTION_INIT
#define SECTION_RODATA