1 # a linker script template.
2 # RAM - start of board's ram
3 # RAM_SIZE - size of board's ram
4 # ROM - start of board's rom
5 # ROM_SIZE - size of board's rom
8 test -z "${ROM:+1}" && NOROM=1
11 STARTUP(cf-${IO}-crt0.o)
15 GROUP(-lc -l${IO} -lcf)
20 ${ROM:+rom (rx) : ORIGIN = ${ROM}, LENGTH = ${ROM_SIZE}}
21 ram (rwx) : ORIGIN = ${RAM}, LENGTH = ${RAM_SIZE}
24 /* Place the stack at the end of memory, unless specified otherwise. */
25 PROVIDE (__stack = ${RAM} + ${RAM_SIZE});
34 cf-${IO}-crt0.o(.text)
39 /* These are for running static constructors and destructors under ELF. */
40 KEEP (*crtbegin.o(.ctors))
41 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
42 KEEP (*(SORT(.ctors.*)))
43 KEEP (*crtend.o(.ctors))
44 KEEP (*crtbegin.o(.dtors))
45 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
46 KEEP (*(SORT(.dtors.*)))
47 KEEP (*crtend.o(.dtors))
50 KEEP (*crtbegin.o(.jcr))
51 KEEP (*(EXCLUDE_FILE (*crtend.o) .jcr))
52 KEEP (*crtend.o(.jcr))
65 LONG (0x4e560000) /* linkw %fp,#0 */
67 SHORT (0x4e5e) /* unlk %fp */
68 SHORT (0x4e75) /* rts */
72 LONG (0x4e560000) /* linkw %fp,#0 */
74 SHORT (0x4e5e) /* unlk %fp */
75 SHORT (0x4e75) /* rts */
81 } >${ROM:+rom}${NOROM:+ram}
85 __data_load = LOADADDR (.data);
105 } >ram ${ROM:+AT>rom}
112 .stabstr 0 (NOLOAD) :
117 /* DWARF debug sections.
118 Symbols in the DWARF debugging sections are relative to the beginning
119 of the section so we begin them at 0. */
121 .debug 0 : { *(.debug) }
122 .line 0 : { *(.line) }
123 /* GNU DWARF 1 extensions */
124 .debug_srcinfo 0 : { *(.debug_srcinfo) }
125 .debug_sfnames 0 : { *(.debug_sfnames) }
126 /* DWARF 1.1 and DWARF 2 */
127 .debug_aranges 0 : { *(.debug_aranges) }
128 .debug_pubnames 0 : { *(.debug_pubnames) }
130 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
131 .debug_abbrev 0 : { *(.debug_abbrev) }
132 .debug_line 0 : { *(.debug_line) }
133 .debug_frame 0 : { *(.debug_frame) }
134 .debug_str 0 : { *(.debug_str) }
135 .debug_loc 0 : { *(.debug_loc) }
136 .debug_macinfo 0 : { *(.debug_macinfo) }