1 /***********************************************************************************
2 * Copyright 2005 Anglia Design
3 * This demo code and associated components are provided as is and has no warranty,
4 * implied or otherwise. You are free to use/modify any of the provided
5 * code at your own risk in your applications with the expressed limitation
6 * of liability (see below)
8 * LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
9 * LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
10 * INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
11 * THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
13 * Author : Spencer Oliver
14 * Web : www.anglia-designs.com
16 ***********************************************************************************/
23 _STACKSIZE_SVC = 1024;
28 /* Memory Definitions */
32 DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
35 /* Section Definitions */
39 /* first section is .text which is used for code */
48 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
54 /* .ctors .dtors are used for c++ constructors/destructors */
58 PROVIDE(__ctors_start__ = .);
59 KEEP(*(SORT(.ctors.*)))
61 PROVIDE(__ctors_end__ = .);
66 PROVIDE(__dtors_start__ = .);
67 KEEP(*(SORT(.dtors.*)))
69 PROVIDE(__dtors_end__ = .);
72 /* .rodata section which is used for read-only data (constants) */
85 PROVIDE (__preinit_array_start = .);
86 KEEP (*(.preinit_array))
87 PROVIDE (__preinit_array_end = .);
88 PROVIDE (__init_array_start = .);
89 KEEP (*(SORT(.init_array.*)))
91 PROVIDE (__init_array_end = .);
92 PROVIDE (__fini_array_start = .);
94 KEEP (*(SORT(.fini_array.*)))
95 PROVIDE (__fini_array_end = .);
100 /* .ARM.exidx is sorted, so has to go in its own output section. */
104 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
109 PROVIDE (vectext = .);
111 .vect : AT (_vectext)
118 _etext = _vectext + SIZEOF(.vect);
121 /* .data section which is used for initialized data */
135 /* .bss section which is used for uninitialized data */
152 /* .heap section which is used for memory allocation */
158 . = MAX(__heap_start__ + _HEAPSIZE , .);
160 __heap_end__ = __heap_start__ + SIZEOF(.heap);
162 /* .stack section - user mode stack */
164 .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
168 . = MAX(__stack_start__ + _STACKSIZE , .);
170 __stack_end__ = __stack_start__ + SIZEOF(.stack);
172 /* .stack_irq section */
174 .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
176 __stack_irq_start__ = .;
178 . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
180 __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
182 /* .stack_fiq section */
184 .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
186 __stack_fiq_start__ = .;
188 . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
190 __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
192 /* .stack_svc section */
194 .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
196 __stack_svc_start__ = .;
198 . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
200 __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
202 /* .stack_abt section */
204 .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
206 __stack_abt_start__ = .;
208 . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
210 __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
212 /* .stack_und section */
214 .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
216 __stack_und_start__ = .;
218 . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
220 __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
222 /* Stabs debugging sections. */
223 .stab 0 : { *(.stab) }
224 .stabstr 0 : { *(.stabstr) }
225 .stab.excl 0 : { *(.stab.excl) }
226 .stab.exclstr 0 : { *(.stab.exclstr) }
227 .stab.index 0 : { *(.stab.index) }
228 .stab.indexstr 0 : { *(.stab.indexstr) }
229 .comment 0 : { *(.comment) }
230 /* DWARF debug sections.
231 Symbols in the DWARF debugging sections are relative to the beginning
232 of the section so we begin them at 0. */
234 .debug 0 : { *(.debug) }
235 .line 0 : { *(.line) }
236 /* GNU DWARF 1 extensions */
237 .debug_srcinfo 0 : { *(.debug_srcinfo) }
238 .debug_sfnames 0 : { *(.debug_sfnames) }
239 /* DWARF 1.1 and DWARF 2 */
240 .debug_aranges 0 : { *(.debug_aranges) }
241 .debug_pubnames 0 : { *(.debug_pubnames) }
243 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
244 .debug_abbrev 0 : { *(.debug_abbrev) }
245 .debug_line 0 : { *(.debug_line) }
246 .debug_frame 0 : { *(.debug_frame) }
247 .debug_str 0 : { *(.debug_str) }
248 .debug_loc 0 : { *(.debug_loc) }
249 .debug_macinfo 0 : { *(.debug_macinfo) }
250 /* SGI/MIPS DWARF 2 extensions */
251 .debug_weaknames 0 : { *(.debug_weaknames) }
252 .debug_funcnames 0 : { *(.debug_funcnames) }
253 .debug_typenames 0 : { *(.debug_typenames) }
254 .debug_varnames 0 : { *(.debug_varnames) }