1 /*******************************************************************************
2 * (c) Copyright 2009 Actel Corporation. All rights reserved.
4 * SmartFusion/Cortex-M3 linker script for creating a SoftConsole downloadable
5 * debug image executing in SmartFusion development board external RAM.
7 * SVN $Revision: 2014 $
8 * SVN $Date: 2010-01-20 10:37:26 +0000 (Wed, 20 Jan 2010) $
11 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
19 /*******************************************************************************
20 * Start of board customization.
21 *******************************************************************************/
24 /* SmartFusion internal eSRAM */
25 esram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
27 /* SmartFusion development board external RAM */
28 external_ram (rwx) : ORIGIN = 0x70000000, LENGTH = 2M
31 RAM_START_ADDRESS = 0x70000000; /* Must be the same value MEMORY region ram ORIGIN above. */
32 RAM_SIZE = 64k; /* Must be the same value MEMORY region ram LENGTH above. */
33 MAIN_STACK_SIZE = 8k; /* Cortex main stack size. */
34 PROCESS_STACK_SIZE = 4k; /* Cortex process stack size (only available with OS extensions).*/
36 /*******************************************************************************
37 * End of board customization.
38 *******************************************************************************/
40 PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
41 PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
42 PROVIDE (_estack = __main_stack_start);
43 PROVIDE (__mirrored_nvm = 0); /* Indicate to startup code that NVM is not mirrored to VMA address .text copy is required. */
56 __text_load = LOADADDR(.text);
58 *(.text .text.* .gnu.linkonce.t.*)
61 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
64 /* These are for running static constructors and destructors under ELF. */
65 KEEP (*crtbegin.o(.ctors))
66 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
67 KEEP (*(SORT(.ctors.*)))
68 KEEP (*crtend.o(.ctors))
69 KEEP (*crtbegin.o(.dtors))
70 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
71 KEEP (*(SORT(.dtors.*)))
72 KEEP (*crtend.o(.dtors))
74 *(.rodata .rodata.* .gnu.linkonce.r.*)
76 *(.ARM.extab* .gnu.linkonce.armextab.*)
84 PROVIDE_HIDDEN (__preinit_array_start = .);
85 KEEP (*(.preinit_array))
86 PROVIDE_HIDDEN (__preinit_array_end = .);
87 PROVIDE_HIDDEN (__init_array_start = .);
88 KEEP (*(SORT(.init_array.*)))
90 PROVIDE_HIDDEN (__init_array_end = .);
91 PROVIDE_HIDDEN (__fini_array_start = .);
93 KEEP (*(SORT(.fini_array.*)))
94 PROVIDE_HIDDEN (__fini_array_end = .);
96 /* .ARM.exidx is sorted, so has to go in its own output section. */
100 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
104 PROVIDE(__text_end = .);
108 __data_load = LOADADDR (.data);
109 _sidata = LOADADDR (.data);
115 *(.data .data.* .gnu.linkonce.d.*)
125 *(.bss .bss.* .gnu.linkonce.b.*)
136 * The .stack section is only specified here in order for the linker to generate
137 * an error if the esram is full.
142 . += PROCESS_STACK_SIZE;
144 . += MAIN_STACK_SIZE;
153 .stabstr 0 (NOLOAD) :
157 /* DWARF debug sections.
158 Symbols in the DWARF debugging sections are relative to the beginning
159 of the section so we begin them at 0. */
161 .debug 0 : { *(.debug) }
162 .line 0 : { *(.line) }
163 /* GNU DWARF 1 extensions */
164 .debug_srcinfo 0 : { *(.debug_srcinfo) }
165 .debug_sfnames 0 : { *(.debug_sfnames) }
166 /* DWARF 1.1 and DWARF 2 */
167 .debug_aranges 0 : { *(.debug_aranges) }
168 .debug_pubnames 0 : { *(.debug_pubnames) }
170 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
171 .debug_abbrev 0 : { *(.debug_abbrev) }
172 .debug_line 0 : { *(.debug_line) }
173 .debug_frame 0 : { *(.debug_frame) }
174 .debug_str 0 : { *(.debug_str) }
175 .debug_loc 0 : { *(.debug_loc) }
176 .debug_macinfo 0 : { *(.debug_macinfo) }
177 /* SGI/MIPS DWARF 2 extensions */
178 .debug_weaknames 0 : { *(.debug_weaknames) }
179 .debug_funcnames 0 : { *(.debug_funcnames) }
180 .debug_typenames 0 : { *(.debug_typenames) }
181 .debug_varnames 0 : { *(.debug_varnames) }
182 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
183 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
184 /DISCARD/ : { *(.note.GNU-stack) *(.isr_vector) }