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 CODE (rx) : ORIGIN = 0x40000000, LENGTH = 0x00040000
33 DATA (rw) : ORIGIN = 0x20000000, LENGTH = 0x00010000
36 /* Section Definitions */
40 /* first section is .text which is used for code */
49 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
55 /* .ctors .dtors are used for c++ constructors/destructors */
59 PROVIDE(__ctors_start__ = .);
60 KEEP(*(SORT(.ctors.*)))
62 PROVIDE(__ctors_end__ = .);
67 PROVIDE(__dtors_start__ = .);
68 KEEP(*(SORT(.dtors.*)))
70 PROVIDE(__dtors_end__ = .);
73 /* .rodata section which is used for read-only data (constants) */
86 PROVIDE (__preinit_array_start = .);
87 KEEP (*(.preinit_array))
88 PROVIDE (__preinit_array_end = .);
89 PROVIDE (__init_array_start = .);
90 KEEP (*(SORT(.init_array.*)))
92 PROVIDE (__init_array_end = .);
93 PROVIDE (__fini_array_start = .);
95 KEEP (*(SORT(.fini_array.*)))
96 PROVIDE (__fini_array_end = .);
101 /* .ARM.exidx is sorted, so has to go in its own output section. */
105 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
110 PROVIDE (vectext = .);
112 .vect : AT (_vectext)
119 _etext = _vectext + SIZEOF(.vect);
122 /* .data section which is used for initialized data */
131 *(.fastrun .fastrun.*)
138 /* .bss section which is used for uninitialized data */
155 /* .heap section which is used for memory allocation */
161 . = MAX(__heap_start__ + _HEAPSIZE , .);
163 __heap_end__ = __heap_start__ + SIZEOF(.heap);
165 /* .stack section - user mode stack */
167 .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
171 . = MAX(__stack_start__ + _STACKSIZE , .);
173 __stack_end__ = __stack_start__ + SIZEOF(.stack);
175 /* .stack_irq section */
177 .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
179 __stack_irq_start__ = .;
181 . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
183 __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
185 /* .stack_fiq section */
187 .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
189 __stack_fiq_start__ = .;
191 . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
193 __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
195 /* .stack_svc section */
197 .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
199 __stack_svc_start__ = .;
201 . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
203 __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
205 /* .stack_abt section */
207 .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
209 __stack_abt_start__ = .;
211 . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
213 __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
215 /* .stack_und section */
217 .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
219 __stack_und_start__ = .;
221 . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
223 __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
225 /* Stabs debugging sections. */
226 .stab 0 : { *(.stab) }
227 .stabstr 0 : { *(.stabstr) }
228 .stab.excl 0 : { *(.stab.excl) }
229 .stab.exclstr 0 : { *(.stab.exclstr) }
230 .stab.index 0 : { *(.stab.index) }
231 .stab.indexstr 0 : { *(.stab.indexstr) }
232 .comment 0 : { *(.comment) }
233 /* DWARF debug sections.
234 Symbols in the DWARF debugging sections are relative to the beginning
235 of the section so we begin them at 0. */
237 .debug 0 : { *(.debug) }
238 .line 0 : { *(.line) }
239 /* GNU DWARF 1 extensions */
240 .debug_srcinfo 0 : { *(.debug_srcinfo) }
241 .debug_sfnames 0 : { *(.debug_sfnames) }
242 /* DWARF 1.1 and DWARF 2 */
243 .debug_aranges 0 : { *(.debug_aranges) }
244 .debug_pubnames 0 : { *(.debug_pubnames) }
246 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
247 .debug_abbrev 0 : { *(.debug_abbrev) }
248 .debug_line 0 : { *(.debug_line) }
249 .debug_frame 0 : { *(.debug_frame) }
250 .debug_str 0 : { *(.debug_str) }
251 .debug_loc 0 : { *(.debug_loc) }
252 .debug_macinfo 0 : { *(.debug_macinfo) }
253 /* SGI/MIPS DWARF 2 extensions */
254 .debug_weaknames 0 : { *(.debug_weaknames) }
255 .debug_funcnames 0 : { *(.debug_funcnames) }
256 .debug_typenames 0 : { *(.debug_typenames) }
257 .debug_varnames 0 : { *(.debug_varnames) }