2 *uncomment this if you want the linker to output srecords.
11 GROUP (-lc -lslite86x -lgcc)
14 * The memory map looks like this:
15 * +--------------------+ <- low memory
19 * | ctor list | the ctor and dtor lists are for
20 * | dtor list | C++ support
22 * +--------------------+
23 * | .data | initialized data goes here
26 * +--------------------+
28 * | __bss_start | start of bss, cleared by crt0
29 * | _end | start of heap, used by sbrk()
30 * +--------------------+
34 * | __stack | top of stack
35 * +--------------------+ <- high memory
38 _STACK_SIZE = (16 * 1024);
40 _RAM_START = 0x40010000;
41 _RAM_END = _RAM_START + _RAM_SIZE;
44 * Base address of the on-CPU peripherals. This is for compatability
51 * Setup the memory map of the MB86931-EB Board (ex931)
52 * stack grows down towards low memory.
56 ram (rwx) : ORIGIN = 0x40010000, LENGTH = 2M
59 __stack = _RAM_START + _RAM_SIZE - 4 * 16;
60 __trap_stack = (_RAM_START + _RAM_SIZE - 4 * 16) - _STACK_SIZE;
63 * All the symbols that might be accessed from C code need to be
64 * listed twice, once with an additional underscore. aout format needs
65 * and extra underscore, whereas coff & elf doesn't. This is to work
69 * Initalize some symbols to be zero so we can reference them in the
70 * crt0 without core dumping. These functions are all optional, but
71 * we do this so we can have our crt0 always use them if they exist.
72 * This is so BSPs work better when using the crt0 installed with gcc.
73 * We have to initalize them twice, so we cover a.out (which prepends
74 * an underscore) and coff object file formats.
76 PROVIDE (hardware_init_hook = 0);
77 PROVIDE (_hardware_init_hook = 0);
78 PROVIDE (software_init_hook = 0);
79 PROVIDE (_software_init_hook = 0);
90 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
91 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
92 KEEP (*(SORT(.ctors.*)))
93 KEEP (*crtend.o(.ctors))
97 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
98 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
99 KEEP (*(SORT(.dtors.*)))
100 KEEP (*crtend.o(.dtors))
110 __EH_FRAME_BEGIN__ = .;
118 .shbss SIZEOF(.text) + ADDR(.text) : {
122 .data ALIGN(0x2000) : {
129 .bss SIZEOF(.data) + ADDR(.data) : {
132 __bss_start = ALIGN(0x8);
133 __bss_start = ALIGN(0x8);
147 .stabstr 0 (NOLOAD) :
151 /* DWARF debug sections.
152 Symbols in the DWARF debugging sections are relative to the beginning
153 of the section so we begin them at 0. */
155 .debug 0 : { *(.debug) }
156 .line 0 : { *(.line) }
157 /* GNU DWARF 1 extensions */
158 .debug_srcinfo 0 : { *(.debug_srcinfo) }
159 .debug_sfnames 0 : { *(.debug_sfnames) }
160 /* DWARF 1.1 and DWARF 2 */
161 .debug_aranges 0 : { *(.debug_aranges) }
162 .debug_pubnames 0 : { *(.debug_pubnames) }
164 .debug_info 0 : { *(.debug_info) }
165 .debug_abbrev 0 : { *(.debug_abbrev) }
166 .debug_line 0 : { *(.debug_line) }
167 .debug_frame 0 : { *(.debug_frame) }
168 .debug_str 0 : { *(.debug_str) }
169 .debug_loc 0 : { *(.debug_loc) }
170 .debug_macinfo 0 : { *(.debug_macinfo) }
171 .debug_ranges 0 : { *(.debug_ranges) }
172 /* SGI/MIPS DWARF 2 extensions */
173 .debug_weaknames 0 : { *(.debug_weaknames) }
174 .debug_funcnames 0 : { *(.debug_funcnames) }
175 .debug_typenames 0 : { *(.debug_typenames) }
176 .debug_varnames 0 : { *(.debug_varnames) }
177 /* These must appear regardless of . */