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
32 rom : ORIGIN = 0x00000000, LENGTH = 0x00400000
\r
33 ram : ORIGIN = 0x00ff0000, LENGTH = 0x00010000
\r
37 * allocate the stack to be at the top of memory, since the stack
\r
41 PROVIDE (__stack = 0x00fffff0);
\r
44 * Initalize some symbols to be zero so we can reference them in the
\r
45 * crt0 without core dumping. These functions are all optional, but
\r
46 * we do this so we can have our crt0 always use them if they exist.
\r
47 * This is so BSPs work better when using the crt0 installed with gcc.
\r
48 * We have to initalize them twice, so we cover a.out (which prepends
\r
49 * an underscore) and coff object file formats.
\r
51 PROVIDE (hardware_init_hook = 0);
\r
52 PROVIDE (_hardware_init_hook = 0);
\r
53 PROVIDE (software_init_hook = 0);
\r
54 PROVIDE (_software_init_hook = 0);
\r
63 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
\r
68 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
\r
74 *(.gcc_except_table)
\r
76 __INIT_SECTION__ = . ;
\r
80 __FINI_SECTION__ = . ;
\r
95 /* .bss 0xff0100 : */
\r
104 _end = ALIGN (0x8);
\r
113 .stabstr 0 (NOLOAD) :
\r