]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo_Hardware_Platform/CMSIS/startup_gcc/production-relocate-executable.ld
Add missing +TCP code.
[freertos] / FreeRTOS / Demo / CORTEX_SmartFusion2_M2S050_SoftConsole / RTOSDemo_Hardware_Platform / CMSIS / startup_gcc / production-relocate-executable.ld
1 /*******************************************************************************
2  * (c) Copyright 2009-2013 Microsemi SoC Products Group.  All rights reserved.
3  * 
4  * SmartFusion2 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.
7  *
8  * SVN $Revision: 5269 $
9  * SVN $Date: 2013-03-21 20:53:38 +0000 (Thu, 21 Mar 2013) $
10  */
11 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
12               "elf32-littlearm")
13 GROUP(-lc -lgcc -lm)
14 OUTPUT_ARCH(arm)
15 ENTRY(Reset_Handler)
16 SEARCH_DIR(.)
17 __DYNAMIC  =  0;
18
19 /*******************************************************************************
20  * Start of board customization.
21  *******************************************************************************/
22 MEMORY
23 {
24   /* SmartFusion2 internal eNVM */
25   rom (rx) : ORIGIN = 0, LENGTH = 256k
26   
27   /* SmartFusion2 internal eSRAM */
28   esram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
29   
30   /* SmartFusion2 development board external RAM */
31   external_ram (rwx) : ORIGIN = 0x70000000, LENGTH = 2M
32 }
33
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).*/
38
39 /*******************************************************************************
40  * End of board customization.
41  *******************************************************************************/
42  
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. */
47
48 SECTIONS
49 {
50   .reset :
51   {
52     __vector_table_vma_base_address = .;
53     *(.isr_vector)
54     /* SystemInit() is called before relocation to RAM so keep in ROM */
55         *system_m2sxxx.o(.text*)    
56     . = ALIGN(0x4);
57   } >rom
58   
59   .text :
60   {
61     CREATE_OBJECT_SYMBOLS
62     __text_load = LOADADDR(.text);
63     __text_start = .;
64     
65     *(.text .text.* .gnu.linkonce.t.*)
66     *(.plt)
67     *(.gnu.warning)
68     *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
69
70     . = ALIGN(0x4);
71     /* These are for running static constructors and destructors under ELF.  */
72     KEEP (*crtbegin.o(.ctors))
73     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
74     KEEP (*(SORT(.ctors.*)))
75     KEEP (*crtend.o(.ctors))
76     KEEP (*crtbegin.o(.dtors))
77     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
78     KEEP (*(SORT(.dtors.*)))
79     KEEP (*crtend.o(.dtors))
80
81     *(.rodata .rodata.* .gnu.linkonce.r.*)
82
83     *(.ARM.extab* .gnu.linkonce.armextab.*)
84     *(.gcc_except_table) 
85     *(.eh_frame_hdr)
86     *(.eh_frame)
87
88     KEEP (*(.init))
89     KEEP (*(.fini))
90
91     PROVIDE_HIDDEN (__preinit_array_start = .);
92     KEEP (*(.preinit_array))
93     PROVIDE_HIDDEN (__preinit_array_end = .);
94     PROVIDE_HIDDEN (__init_array_start = .);
95     KEEP (*(SORT(.init_array.*)))
96     KEEP (*(.init_array))
97     PROVIDE_HIDDEN (__init_array_end = .);
98     PROVIDE_HIDDEN (__fini_array_start = .);
99     KEEP (*(.fini_array))
100     KEEP (*(SORT(.fini_array.*)))
101     PROVIDE_HIDDEN (__fini_array_end = .);
102   } >external_ram AT>rom
103   /* .ARM.exidx is sorted, so has to go in its own output section.  */
104    __exidx_start = .;
105   .ARM.exidx :
106   {
107     *(.ARM.exidx* .gnu.linkonce.armexidx.*)
108   } >external_ram AT>rom
109   __exidx_end = .;
110   _etext = .;
111
112   .data :
113   {
114     __data_load = LOADADDR(.data);
115     _sidata = LOADADDR (.data);
116     __data_start = .;
117     _sdata = .;
118     KEEP(*(.jcr))
119     *(.got.plt) *(.got)
120     *(.shdata)
121     *(.data .data.* .gnu.linkonce.d.*)
122     . = ALIGN (4);
123         _edata = .;
124   } >esram AT>rom
125
126   .bss :
127   {
128     __bss_start__ = . ;
129     _sbss = .;
130     *(.shbss)
131     *(.bss .bss.* .gnu.linkonce.b.*)
132     *(COMMON)
133     . = ALIGN (8);
134     __bss_end__ = .;
135     _end = .;
136     __end = _end;
137     _ebss = .;
138     PROVIDE(end = .);
139   } >esram AT>rom
140
141   .stab 0 (NOLOAD) :
142   {
143     *(.stab)
144   }
145
146   .stabstr 0 (NOLOAD) :
147   {
148     *(.stabstr)
149   }
150   /* DWARF debug sections.
151      Symbols in the DWARF debugging sections are relative to the beginning
152      of the section so we begin them at 0.  */
153   /* DWARF 1 */
154   .debug          0 : { *(.debug) }
155   .line           0 : { *(.line) }
156   /* GNU DWARF 1 extensions */
157   .debug_srcinfo  0 : { *(.debug_srcinfo) }
158   .debug_sfnames  0 : { *(.debug_sfnames) }
159   /* DWARF 1.1 and DWARF 2 */
160   .debug_aranges  0 : { *(.debug_aranges) }
161   .debug_pubnames 0 : { *(.debug_pubnames) }
162   /* DWARF 2 */
163   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
164   .debug_abbrev   0 : { *(.debug_abbrev) }
165   .debug_line     0 : { *(.debug_line) }
166   .debug_frame    0 : { *(.debug_frame) }
167   .debug_str      0 : { *(.debug_str) }
168   .debug_loc      0 : { *(.debug_loc) }
169   .debug_macinfo  0 : { *(.debug_macinfo) }
170   /* SGI/MIPS DWARF 2 extensions */
171   .debug_weaknames 0 : { *(.debug_weaknames) }
172   .debug_funcnames 0 : { *(.debug_funcnames) }
173   .debug_typenames 0 : { *(.debug_typenames) }
174   .debug_varnames  0 : { *(.debug_varnames) }
175   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
176   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
177   /DISCARD/ : { *(.note.GNU-stack)  }
178 }