1 /*******************************************************************************
2 * (c) Copyright 2009-2013 Microsemi SoC Products Group. All rights reserved.
4 * SmartFusion2 Cortex-M3 linker script creating an executable image for use in
5 * the Libero flow for executing code in place in internal eNVM.
7 * SVN $Revision: 5269 $
8 * SVN $Date: 2013-03-21 20:53:38 +0000 (Thu, 21 Mar 2013) $
10 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
18 /*******************************************************************************
19 * Start of board customization.
20 *******************************************************************************/
23 /* SmartFusion2 internal eNVM */
24 rom (rx) : ORIGIN = 0, LENGTH = 256k
26 /* SmartFusion2 internal eSRAM */
27 ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
30 RAM_START_ADDRESS = 0x20000000; /* Must be the same value as MEMORY region ram ORIGIN above. */
31 RAM_SIZE = 64k; /* Must be the same value as MEMORY region ram LENGTH above. */
32 MAIN_STACK_SIZE = 8k; /* Cortex main stack size. */
33 PROCESS_STACK_SIZE = 4k; /* Cortex process stack size (only available with OS extensions).*/
35 /*******************************************************************************
36 * End of board customization.
37 *******************************************************************************/
39 PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
40 PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
41 PROVIDE (_estack = __main_stack_start);
42 PROVIDE (__mirrored_nvm = 0); /* Indicate to startup code that NVM is not mirrored to VMA address .text copy is required. */
48 __vector_table_vma_base_address = .;
56 __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.*)
108 __data_load = LOADADDR(.data);
109 _sidata = LOADADDR (.data);
115 *(.data .data.* .gnu.linkonce.d.*)
125 *(.bss .bss.* .gnu.linkonce.b.*)
140 .stabstr 0 (NOLOAD) :
144 /* DWARF debug sections.
145 Symbols in the DWARF debugging sections are relative to the beginning
146 of the section so we begin them at 0. */
148 .debug 0 : { *(.debug) }
149 .line 0 : { *(.line) }
150 /* GNU DWARF 1 extensions */
151 .debug_srcinfo 0 : { *(.debug_srcinfo) }
152 .debug_sfnames 0 : { *(.debug_sfnames) }
153 /* DWARF 1.1 and DWARF 2 */
154 .debug_aranges 0 : { *(.debug_aranges) }
155 .debug_pubnames 0 : { *(.debug_pubnames) }
157 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
158 .debug_abbrev 0 : { *(.debug_abbrev) }
159 .debug_line 0 : { *(.debug_line) }
160 .debug_frame 0 : { *(.debug_frame) }
161 .debug_str 0 : { *(.debug_str) }
162 .debug_loc 0 : { *(.debug_loc) }
163 .debug_macinfo 0 : { *(.debug_macinfo) }
164 /* SGI/MIPS DWARF 2 extensions */
165 .debug_weaknames 0 : { *(.debug_weaknames) }
166 .debug_funcnames 0 : { *(.debug_funcnames) }
167 .debug_typenames 0 : { *(.debug_typenames) }
168 .debug_varnames 0 : { *(.debug_varnames) }
169 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
170 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
171 /DISCARD/ : { *(.note.GNU-stack) }