1 /*******************************************************************************
2 * (c) Copyright 2012-2013 Microsemi SoC Products Group. All rights reserved.
4 * SmartFusion2 Cortex-M3 linker script for creating a SoftConsole downloadable
5 * debug image executing in SmartFusion2 development board external RAM.
7 * SVN $Revision: 5269 $
8 * SVN $Date: 2013-03-21 20:53:38 +0000 (Thu, 21 Mar 2013) $
11 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
19 /*******************************************************************************
20 * Start of board customization.
21 *******************************************************************************/
24 /* SmartFusion2 internal eSRAM */
25 esram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
27 /* SmartFusion2 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. */
49 __vector_table_vma_base_address = .;
57 __text_load = LOADADDR(.text);
59 *(.text .text.* .gnu.linkonce.t.*)
62 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
65 /* These are for running static constructors and destructors under ELF. */
66 KEEP (*crtbegin.o(.ctors))
67 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
68 KEEP (*(SORT(.ctors.*)))
69 KEEP (*crtend.o(.ctors))
70 KEEP (*crtbegin.o(.dtors))
71 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
72 KEEP (*(SORT(.dtors.*)))
73 KEEP (*crtend.o(.dtors))
75 *(.rodata .rodata.* .gnu.linkonce.r.*)
77 *(.ARM.extab* .gnu.linkonce.armextab.*)
85 PROVIDE_HIDDEN (__preinit_array_start = .);
86 KEEP (*(.preinit_array))
87 PROVIDE_HIDDEN (__preinit_array_end = .);
88 PROVIDE_HIDDEN (__init_array_start = .);
89 KEEP (*(SORT(.init_array.*)))
91 PROVIDE_HIDDEN (__init_array_end = .);
92 PROVIDE_HIDDEN (__fini_array_start = .);
94 KEEP (*(SORT(.fini_array.*)))
95 PROVIDE_HIDDEN (__fini_array_end = .);
97 /* .ARM.exidx is sorted, so has to go in its own output section. */
101 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
105 PROVIDE(__text_end = .);
109 __data_load = LOADADDR (.data);
110 _sidata = LOADADDR (.data);
116 *(.data .data.* .gnu.linkonce.d.*)
126 *(.bss .bss.* .gnu.linkonce.b.*)
137 * The .stack section is only specified here in order for the linker to generate
138 * an error if the esram is full.
143 . += PROCESS_STACK_SIZE;
145 . += MAIN_STACK_SIZE;
154 .stabstr 0 (NOLOAD) :
158 /* DWARF debug sections.
159 Symbols in the DWARF debugging sections are relative to the beginning
160 of the section so we begin them at 0. */
162 .debug 0 : { *(.debug) }
163 .line 0 : { *(.line) }
164 /* GNU DWARF 1 extensions */
165 .debug_srcinfo 0 : { *(.debug_srcinfo) }
166 .debug_sfnames 0 : { *(.debug_sfnames) }
167 /* DWARF 1.1 and DWARF 2 */
168 .debug_aranges 0 : { *(.debug_aranges) }
169 .debug_pubnames 0 : { *(.debug_pubnames) }
171 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
172 .debug_abbrev 0 : { *(.debug_abbrev) }
173 .debug_line 0 : { *(.debug_line) }
174 .debug_frame 0 : { *(.debug_frame) }
175 .debug_str 0 : { *(.debug_str) }
176 .debug_loc 0 : { *(.debug_loc) }
177 .debug_macinfo 0 : { *(.debug_macinfo) }
178 /* SGI/MIPS DWARF 2 extensions */
179 .debug_weaknames 0 : { *(.debug_weaknames) }
180 .debug_funcnames 0 : { *(.debug_funcnames) }
181 .debug_typenames 0 : { *(.debug_typenames) }
182 .debug_varnames 0 : { *(.debug_varnames) }
183 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
184 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
185 /DISCARD/ : { *(.note.GNU-stack) *(.isr_vector) }