mirror of
https://github.com/zeldaret/tp
synced 2026-07-12 07:37:59 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user