1 /* Linker script for m52235evb
3 * Version:Sourcery G++ Lite 4.2-125
4 * BugURL:https://support.codesourcery.com/GNUToolchain/
6 * Copyright 2007, 2008 CodeSourcery.
8 * The authors hereby grant permission to use, copy, modify, distribute,
9 * and license this software and its documentation for any purpose, provided
10 * that existing copyright notices are retained in all copies and that this
11 * notice is included verbatim in any distributions. No written agreement,
12 * license, or royalty fee is required for any of the authorized uses.
13 * Modifications to this software may be copyrighted by their authors
14 * and need not follow the licensing terms described here, provided that
15 * the new terms are clearly indicated on the first page of each file where
21 GROUP(-lgcc -lc -lcs3 -lcs3unhosted -lcs3coldfire)
25 ram (rw) : ORIGIN = 0x20000000, LENGTH = 32K
26 vectorrom (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
27 cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000020
28 rom (rx) : ORIGIN = 0x00000420, LENGTH = 256K - 0x400 - 0x20
29 ipsbar (rw) : ORIGIN = 0x40000000, LENGTH = 2M
32 /* These force the linker to search for particular symbols from
33 * the start of the link process and thus ensure the user's
34 * overrides are picked up
36 EXTERN(__cs3_reset_m52235evb)
37 INCLUDE coldfire-names.inc
38 EXTERN(__cs3_interrupt_vector_coldfire)
39 EXTERN(__cs3_start_c main __cs3_stack __cs3_heap_end)
42 PROVIDE(__cs3_heap_start = _end);
43 PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
44 PROVIDE(__cs3_region_num = (__cs3_regions_end - __cs3_regions) / 20);
45 PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram);
53 __cs3_region_start_rom = .;
54 *(.cs3.region-head.rom)
55 ASSERT (. == __cs3_region_start_rom, ".cs3.region-head.rom not permitted");
56 __cs3_interrupt_vector = __cs3_interrupt_vector_coldfire;
57 *(.cs3.interrupt_vector)
58 /* Make sure we pulled in an interrupt vector. */
59 ASSERT (. != __cs3_interrupt_vector_coldfire, "No interrupt vector");
72 PROVIDE(__cs3_reset_m52235evb = _start);
73 __cs3_reset = __cs3_reset_m52235evb;
76 *(.text .text.* .gnu.linkonce.t.*)
79 KEEP (*crtbegin.o(.jcr))
80 KEEP (*(EXCLUDE_FILE (*crtend.o) .jcr))
81 KEEP (*crtend.o(.jcr))
84 *(.gcc_except_table .gcc_except_table.*)
86 .eh_frame_hdr : ALIGN (4)
88 KEEP (*(.eh_frame_hdr))
96 *(.rodata .rodata.* .gnu.linkonce.r.*)
100 LONG (0x4e560000) /* linkw %fp,#0 */
102 SHORT (0x4e5e) /* unlk %fp */
103 SHORT (0x4e75) /* rts */
106 __preinit_array_start = .;
107 KEEP (*(.preinit_array))
108 __preinit_array_end = .;
111 __init_array_start = .;
112 KEEP (*(SORT(.init_array.*)))
113 KEEP (*(.init_array))
114 __init_array_end = .;
118 LONG (0x4e560000) /* linkw %fp,#0 */
120 SHORT (0x4e5e) /* unlk %fp */
121 SHORT (0x4e75) /* rts */
124 __fini_array_start = .;
125 KEEP (*(.fini_array))
126 KEEP (*(SORT(.fini_array.*)))
127 __fini_array_end = .;
130 KEEP (*crtbegin.o(.ctors))
131 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
132 KEEP (*(SORT(.ctors.*)))
133 KEEP (*crtend.o(.ctors))
136 KEEP (*crtbegin.o(.dtors))
137 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
138 KEEP (*(SORT(.dtors.*)))
139 KEEP (*crtend.o(.dtors))
146 LONG (__cs3_region_init_ram)
147 LONG (__cs3_region_start_ram)
148 LONG (__cs3_region_init_size_ram)
149 LONG (__cs3_region_zero_size_ram)
150 __cs3_regions_end = .;
158 /* __cs3_region_end_rom is deprecated */
159 __cs3_region_end_rom = __cs3_region_start_rom + LENGTH(rom);
160 __cs3_region_size_rom = LENGTH(rom);
164 __cs3_region_start_ipsbar = .;
165 *(.cs3.region-head.ipsbar)
168 /* __cs3_region_end_ipsbar is deprecated */
169 __cs3_region_end_ipsbar = __cs3_region_start_ipsbar + LENGTH(ipsbar);
170 __cs3_region_size_ipsbar = LENGTH(ipsbar);
174 __cs3_region_start_ram = .;
175 *(.cs3.region-head.ram)
178 *(.data .data.* .gnu.linkonce.d.*)
186 *(.bss .bss.* .gnu.linkonce.b.*)
193 /* __cs3_region_end_ram is deprecated */
194 __cs3_region_end_ram = __cs3_region_start_ram + LENGTH(ram);
195 __cs3_region_size_ram = LENGTH(ram);
196 __cs3_region_init_ram = LOADADDR (.data);
197 __cs3_region_init_size_ram = _edata - ADDR (.data);
198 __cs3_region_zero_size_ram = _end - _edata;
200 .stab 0 (NOLOAD) : { *(.stab) }
201 .stabstr 0 (NOLOAD) : { *(.stabstr) }
202 /* DWARF debug sections.
203 * Symbols in the DWARF debugging sections are relative to the beginning
204 * of the section so we begin them at 0. */
206 .debug 0 : { *(.debug) }
207 .line 0 : { *(.line) }
208 /* GNU DWARF 1 extensions */
209 .debug_srcinfo 0 : { *(.debug_srcinfo) }
210 .debug_sfnames 0 : { *(.debug_sfnames) }
211 /* DWARF 1.1 and DWARF 2 */
212 .debug_aranges 0 : { *(.debug_aranges) }
213 .debug_pubnames 0 : { *(.debug_pubnames) }
215 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
216 .debug_abbrev 0 : { *(.debug_abbrev) }
217 .debug_line 0 : { *(.debug_line) }
218 .debug_frame 0 : { *(.debug_frame) }
219 .debug_str 0 : { *(.debug_str) }
220 .debug_loc 0 : { *(.debug_loc) }
221 .debug_macinfo 0 : { *(.debug_macinfo) }
222 /* SGI/MIPS DWARF 2 extensions */
223 .debug_weaknames 0 : { *(.debug_weaknames) }
224 .debug_funcnames 0 : { *(.debug_funcnames) }
225 .debug_typenames 0 : { *(.debug_typenames) }
226 .debug_varnames 0 : { *(.debug_varnames) }