NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
__ppc_eabi_init.h
1#ifndef RVL_SDK_OS_PPC_EABI_INIT_H
2#define RVL_SDK_OS_PPC_EABI_INIT_H
3#include <types.h>
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#pragma section ".init"
9DECL_SECTION(".init") void __init_hardware(void);
10DECL_SECTION(".init") void __flush_cache(void*, size_t);
11
12void __init_user(void);
13void __init_cpp(void);
14void __fini_cpp(void);
15DECL_WEAK void exit(void);
16void _ExitProcess(void);
17
18/**
19 * Linker Generated Symbols
20 */
21
22// Declare linker symbols for a section in the ROM
23#define DECL_ROM_SECTION(x) \
24 extern u8 _f##x[]; \
25 extern u8 _f##x##_rom[]; \
26 extern u8 _e##x[];
27
28// Declare linker symbols for a BSS section
29#define DECL_BSS_SECTION(x) \
30 extern u8 _f##x[]; \
31 extern u8 _e##x[];
32
33// Debugger stack
34extern u8 _db_stack_addr[];
35extern u8 _db_stack_end[];
36
37// Program arena
38extern u8 __ArenaLo[];
39extern u8 __ArenaHi[];
40
41// Program stack
42extern u8 _stack_addr[];
43extern u8 _stack_end[];
44
45// Small data bases
46extern u8 _SDA_BASE_[];
47extern u8 _SDA2_BASE_[];
48
49// ROM sections
50DECL_ROM_SECTION(_init);
51DECL_ROM_SECTION(extab);
52DECL_ROM_SECTION(extabindex);
53DECL_ROM_SECTION(_text);
54DECL_ROM_SECTION(_ctors);
55DECL_ROM_SECTION(_dtors);
56DECL_ROM_SECTION(_rodata);
57DECL_ROM_SECTION(_data);
58DECL_ROM_SECTION(_sdata);
59DECL_ROM_SECTION(_sdata2);
60DECL_ROM_SECTION(_stack);
61
62// BSS sections
63DECL_BSS_SECTION(_bss);
64DECL_BSS_SECTION(_sbss);
65DECL_BSS_SECTION(_sbss2);
66
67typedef struct RomSection {
68 void* phys; // at 0x4
69 void* virt; // at 0x0
70 size_t size; // at 0x8
72
73typedef struct BssSection {
74 void* virt; // at 0x0
75 size_t size; // at 0x8
77
78typedef struct ExtabIndexInfo {
79 void* section; // at 0x0
80 struct ExtabIndexInfo* extab; // at 0x4
81 void* codeStart; // at 0x8
82 u32 codeSize; // at 0xC
84
85DECL_SECTION(".init") extern const RomSection _rom_copy_info[];
86DECL_SECTION(".init") extern const BssSection _bss_init_info[];
87DECL_SECTION(".init") extern const ExtabIndexInfo _eti_init_info[];
88
89#ifdef __cplusplus
90}
91#endif
92#endif