2 *uncomment this if you want the linker to output srecords.
7 OUTPUT_ARCH(TARGET_OBJ_FORMAT)
10 GROUP(cygmon-salib.o -lc -lgcc -lc)
13 * The memory map looks like this:
14 * +--------------------+ <- low memory
18 * | ctor list | the ctor and dtor lists are for
19 * | dtor list | C++ support
21 * +--------------------+
22 * | .data | initialized data goes here
25 * +--------------------+
27 * | __bss_start | start of bss, cleared by crt0
28 * | _end | start of heap, used by sbrk()
29 * +--------------------+
33 * | __stack | top of stack
34 * +--------------------+ <- high memory
37 _STACK_SIZE = (16 * 1024);
39 _RAM_START = TARGET_RAM_START;
40 _RAM_END = _RAM_START + _RAM_SIZE;
43 * Setup the standard memory map. The stack grows down towards low memory.
47 ram : ORIGIN = TARGET_RAM_START, LENGTH = 1M
50 __stack = (_RAM_START + _RAM_SIZE - 4 * 16) - _STACK_SIZE;
53 * All the symbols that might be accessed from C code need to be
54 * listed twice, once with an additional underscore. aout format needs
55 * and extra underscore, whereas coff & elf doesn't. This is to work
59 * Initalize some symbols to be zero so we can reference them in the
60 * crt0 without core dumping. These functions are all optional, but
61 * we do this so we can have our crt0 always use them if they exist.
62 * This is so BSPs work better when using the crt0 installed with gcc.
63 * We have to initalize them twice, so we cover a.out (which prepends
64 * an underscore) and coff object file formats.
66 PROVIDE (hardware_init_hook = 0);
67 PROVIDE (_hardware_init_hook = 0);
68 PROVIDE (software_init_hook = 0);
69 PROVIDE (_software_init_hook = 0);
78 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
79 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
80 KEEP (*(SORT(.ctors.*)))
81 KEEP (*crtend.o(.ctors))
85 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
86 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
87 KEEP (*(SORT(.dtors.*)))
88 KEEP (*crtend.o(.dtors))
102 .shbss SIZEOF(.text) + ADDR(.text) : {
114 .bss SIZEOF(.data) + ADDR(.data) : {
117 __bss_start = ALIGN(0x8);
118 __bss_start = ALIGN(0x8);
132 .stabstr 0 (NOLOAD) :
136 /* DWARF debug sections.
137 Symbols in the DWARF debugging sections are relative to the beginning
138 of the section so we begin them at 0. */
148 /* GNU DWARF 1 extensions */
149 .debug_srcinfo 0 (NOLOAD) :
153 .debug_sfnames 0 (NOLOAD) :
157 /* DWARF 1.1 and DWARF 2 */
158 .debug_aranges 0 (NOLOAD) :
162 .debug_pubnames 0 (NOLOAD) :
167 .debug_info 0 (NOLOAD) :
171 .debug_abbrev 0 (NOLOAD) :
175 .debug_line 0 (NOLOAD) :
179 .debug_frame 0 (NOLOAD) :
183 .debug_str 0 (NOLOAD) :
187 .debug_loc 0 (NOLOAD) :
191 .debug_macinfo 0 (NOLOAD) :