3 /*GROUP(-lbcc -lc -lgcc)*/
\r
7 * Setup the memory map of the SEGA Genesis.
\r
8 * stack grows down from high memory.
\r
10 * The memory map look like this:
\r
11 * +--------------------+ <- low memory
\r
14 * | ctor list | the ctor and dtor lists are for
\r
15 * | dtor list | C++ support
\r
16 * +--------------------+
\r
17 * | .data | initialized data goes here
\r
19 * +--------------------+
\r
21 * | __bss_start | start of bss, cleared by crt0
\r
22 * | _end | start of heap, used by sbrk()
\r
23 * +--------------------+
\r
27 * | __stack | top of stack
\r
28 * +--------------------+
\r
33 rom : ORIGIN = 0x00000000, LENGTH = 0x00400000
\r
34 ram : ORIGIN = 0xffff0000, LENGTH = 0x00010000
\r
39 ram : ORIGIN = 0x0, LENGTH = 0xfffffff
\r
43 * allocate the stack to be at the top of memory, since the stack
\r
47 PROVIDE (__stack = 0x00fffff0);
\r
49 PROVIDE (ram = 0xffff0000);
\r
51 * Initalize some symbols to be zero so we can reference them in the
\r
52 * crt0 without core dumping. These functions are all optional, but
\r
53 * we do this so we can have our crt0 always use them if they exist.
\r
54 * This is so BSPs work better when using the crt0 installed with gcc.
\r
55 * We have to initalize them twice, so we cover a.out (which prepends
\r
56 * an underscore) and coff object file formats.
\r
58 PROVIDE (hardware_init_hook = 0);
\r
59 PROVIDE (_hardware_init_hook = 0);
\r
60 PROVIDE (software_init_hook = 0);
\r
61 PROVIDE (_software_init_hook = 0);
\r
70 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
\r
75 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
\r
80 *(.gcc_except_table)
\r
82 __INIT_SECTION__ = . ;
\r
84 SHORT (0x4e75) /* rts */
\r
86 __FINI_SECTION__ = . ;
\r
88 SHORT (0x4e75) /* rts */
\r
109 _end = ALIGN (0x8);
\r
118 .stabstr 0 (NOLOAD) :
\r