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 -lcs3hosted -lcs3coldfire)
25 ram (rw) : ORIGIN = 0x20000000, LENGTH = 32K
\r
26 vectorrom (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
\r
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)
41 /* force exit to be picked up in a hosted or os environment */
44 PROVIDE(__cs3_heap_start = _end);
45 PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
46 PROVIDE(__cs3_region_num = (__cs3_regions_end - __cs3_regions) / 20);
47 PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram);
54 CREATE_OBJECT_SYMBOLS
\r
55 __cs3_region_start_rom = .;
\r
56 *(.cs3.region-head.rom)
\r
57 ASSERT (. == __cs3_region_start_rom, ".cs3.region-head.rom not permitted");
\r
58 __cs3_interrupt_vector = __cs3_interrupt_vector_coldfire;
\r
59 *(.cs3.interrupt_vector)
\r
60 /* Make sure we pulled in an interrupt vector. */
\r
61 ASSERT (. != __cs3_interrupt_vector_coldfire, "No interrupt vector");
\r
74 PROVIDE(__cs3_reset_m52235evb = _start);
75 __cs3_reset = __cs3_reset_m52235evb;
78 *(.text .text.* .gnu.linkonce.t.*)
81 KEEP (*crtbegin.o(.jcr))
82 KEEP (*(EXCLUDE_FILE (*crtend.o) .jcr))
83 KEEP (*crtend.o(.jcr))
86 *(.gcc_except_table .gcc_except_table.*)
88 .eh_frame_hdr : ALIGN (4)
90 KEEP (*(.eh_frame_hdr))
98 *(.rodata .rodata.* .gnu.linkonce.r.*)
102 LONG (0x4e560000) /* linkw %fp,#0 */
104 SHORT (0x4e5e) /* unlk %fp */
105 SHORT (0x4e75) /* rts */
108 __preinit_array_start = .;
109 KEEP (*(.preinit_array))
110 __preinit_array_end = .;
113 __init_array_start = .;
114 KEEP (*(SORT(.init_array.*)))
115 KEEP (*(.init_array))
116 __init_array_end = .;
120 LONG (0x4e560000) /* linkw %fp,#0 */
122 SHORT (0x4e5e) /* unlk %fp */
123 SHORT (0x4e75) /* rts */
126 __fini_array_start = .;
127 KEEP (*(.fini_array))
128 KEEP (*(SORT(.fini_array.*)))
129 __fini_array_end = .;
132 KEEP (*crtbegin.o(.ctors))
133 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
134 KEEP (*(SORT(.ctors.*)))
135 KEEP (*crtend.o(.ctors))
138 KEEP (*crtbegin.o(.dtors))
139 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
140 KEEP (*(SORT(.dtors.*)))
141 KEEP (*crtend.o(.dtors))
148 LONG (__cs3_region_init_ram)
149 LONG (__cs3_region_start_ram)
150 LONG (__cs3_region_init_size_ram)
151 LONG (__cs3_region_zero_size_ram)
152 __cs3_regions_end = .;
160 /* __cs3_region_end_rom is deprecated */
161 __cs3_region_end_rom = __cs3_region_start_rom + LENGTH(rom);
162 __cs3_region_size_rom = LENGTH(rom);
166 __cs3_region_start_ipsbar = .;
167 *(.cs3.region-head.ipsbar)
170 /* __cs3_region_end_ipsbar is deprecated */
171 __cs3_region_end_ipsbar = __cs3_region_start_ipsbar + LENGTH(ipsbar);
172 __cs3_region_size_ipsbar = LENGTH(ipsbar);
176 __cs3_region_start_ram = .;
177 *(.cs3.region-head.ram)
180 *(.data .data.* .gnu.linkonce.d.*)
188 *(.bss .bss.* .gnu.linkonce.b.*)
195 /* __cs3_region_end_ram is deprecated */
196 __cs3_region_end_ram = __cs3_region_start_ram + LENGTH(ram);
197 __cs3_region_size_ram = LENGTH(ram);
198 __cs3_region_init_ram = LOADADDR (.data);
199 __cs3_region_init_size_ram = _edata - ADDR (.data);
200 __cs3_region_zero_size_ram = _end - _edata;
202 .stab 0 (NOLOAD) : { *(.stab) }
203 .stabstr 0 (NOLOAD) : { *(.stabstr) }
204 /* DWARF debug sections.
205 * Symbols in the DWARF debugging sections are relative to the beginning
206 * of the section so we begin them at 0. */
208 .debug 0 : { *(.debug) }
209 .line 0 : { *(.line) }
210 /* GNU DWARF 1 extensions */
211 .debug_srcinfo 0 : { *(.debug_srcinfo) }
212 .debug_sfnames 0 : { *(.debug_sfnames) }
213 /* DWARF 1.1 and DWARF 2 */
214 .debug_aranges 0 : { *(.debug_aranges) }
215 .debug_pubnames 0 : { *(.debug_pubnames) }
217 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
218 .debug_abbrev 0 : { *(.debug_abbrev) }
219 .debug_line 0 : { *(.debug_line) }
220 .debug_frame 0 : { *(.debug_frame) }
221 .debug_str 0 : { *(.debug_str) }
222 .debug_loc 0 : { *(.debug_loc) }
223 .debug_macinfo 0 : { *(.debug_macinfo) }
224 /* SGI/MIPS DWARF 2 extensions */
225 .debug_weaknames 0 : { *(.debug_weaknames) }
226 .debug_funcnames 0 : { *(.debug_funcnames) }
227 .debug_typenames 0 : { *(.debug_typenames) }
228 .debug_varnames 0 : { *(.debug_varnames) }