1 /*******************************************************************************
2 * (c) Copyright 2009 Actel Corporation. All rights reserved.
4 * SmartFusion/Cortex-M3 linker script creating an executable image for use in
5 * the Libero flow for relocating executable from internal eNVM to external RAM
6 * before starting execution.
8 * SVN $Revision: 1766 $
9 * SVN $Date: 2009-12-11 16:33:35 +0000 (Fri, 11 Dec 2009) $
11 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
19 /*******************************************************************************
20 * Start of board customization.
21 *******************************************************************************/
24 /* SmartFusion internal eNVM */
25 rom (rx) : ORIGIN = 0, LENGTH = 256k
27 /* SmartFusion internal eSRAM */
28 esram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
30 /* SmartFusion development board external RAM */
31 external_ram (rwx) : ORIGIN = 0x70000000, LENGTH = 2M
34 RAM_START_ADDRESS = 0x20000000; /* Must be the same value as MEMORY region esram ORIGIN above. */
35 RAM_SIZE = 64k; /* Must be the same value as MEMORY region esram LENGTH above. */
36 MAIN_STACK_SIZE = 8k; /* Cortex main stack size. */
37 PROCESS_STACK_SIZE = 4k; /* Cortex process stack size (only available with OS extensions).*/
39 /*******************************************************************************
40 * End of board customization.
41 *******************************************************************************/
43 PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
44 PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
45 PROVIDE (_estack = __main_stack_start);
46 PROVIDE (__mirrored_nvm = 0); /* Indicate to startup code that NVM is not mirrored to VMA address .text copy is required. */
53 /* *sys_boot.o(.text)*/
60 __text_load = LOADADDR(.text);
63 *(.text .text.* .gnu.linkonce.t.*)
66 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
69 /* These are for running static constructors and destructors under ELF. */
70 KEEP (*crtbegin.o(.ctors))
71 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
72 KEEP (*(SORT(.ctors.*)))
73 KEEP (*crtend.o(.ctors))
74 KEEP (*crtbegin.o(.dtors))
75 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
76 KEEP (*(SORT(.dtors.*)))
77 KEEP (*crtend.o(.dtors))
79 *(.rodata .rodata.* .gnu.linkonce.r.*)
81 *(.ARM.extab* .gnu.linkonce.armextab.*)
89 PROVIDE_HIDDEN (__preinit_array_start = .);
90 KEEP (*(.preinit_array))
91 PROVIDE_HIDDEN (__preinit_array_end = .);
92 PROVIDE_HIDDEN (__init_array_start = .);
93 KEEP (*(SORT(.init_array.*)))
95 PROVIDE_HIDDEN (__init_array_end = .);
96 PROVIDE_HIDDEN (__fini_array_start = .);
98 KEEP (*(SORT(.fini_array.*)))
99 PROVIDE_HIDDEN (__fini_array_end = .);
100 } >external_ram AT>rom
101 /* .ARM.exidx is sorted, so has to go in its own output section. */
105 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
106 } >external_ram AT>rom
112 __data_load = LOADADDR(.data);
113 _sidata = LOADADDR (.data);
119 *(.data .data.* .gnu.linkonce.d.*)
129 *(.bss .bss.* .gnu.linkonce.b.*)
144 .stabstr 0 (NOLOAD) :
148 /* DWARF debug sections.
149 Symbols in the DWARF debugging sections are relative to the beginning
150 of the section so we begin them at 0. */
152 .debug 0 : { *(.debug) }
153 .line 0 : { *(.line) }
154 /* GNU DWARF 1 extensions */
155 .debug_srcinfo 0 : { *(.debug_srcinfo) }
156 .debug_sfnames 0 : { *(.debug_sfnames) }
157 /* DWARF 1.1 and DWARF 2 */
158 .debug_aranges 0 : { *(.debug_aranges) }
159 .debug_pubnames 0 : { *(.debug_pubnames) }
161 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
162 .debug_abbrev 0 : { *(.debug_abbrev) }
163 .debug_line 0 : { *(.debug_line) }
164 .debug_frame 0 : { *(.debug_frame) }
165 .debug_str 0 : { *(.debug_str) }
166 .debug_loc 0 : { *(.debug_loc) }
167 .debug_macinfo 0 : { *(.debug_macinfo) }
168 /* SGI/MIPS DWARF 2 extensions */
169 .debug_weaknames 0 : { *(.debug_weaknames) }
170 .debug_funcnames 0 : { *(.debug_funcnames) }
171 .debug_typenames 0 : { *(.debug_typenames) }
172 .debug_varnames 0 : { *(.debug_varnames) }
173 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
174 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
175 /DISCARD/ : { *(.note.GNU-stack) }