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 = 0x04000000, LENGTH = 0x00018000
35 /* Section Definitions */
39 /* first section is .text which is used for code */
53 /* .ctors .dtors are used for c++ constructors/destructors */
57 PROVIDE(__ctors_start__ = .);
58 KEEP(*(SORT(.ctors.*)))
60 PROVIDE(__ctors_end__ = .);
65 PROVIDE(__dtors_start__ = .);
66 KEEP(*(SORT(.dtors.*)))
68 PROVIDE(__dtors_end__ = .);
71 /* .rodata section which is used for read-only data (constants) */
83 /* .data section which is used for initialized data */
97 /* .bss section which is used for uninitialized data */
114 /* .heap section which is used for memory allocation */
120 . = MAX(__heap_start__ + _HEAPSIZE , .);
122 __heap_end__ = __heap_start__ + SIZEOF(.heap);
124 /* .stack section - user mode stack */
126 .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
130 . = MAX(__stack_start__ + _STACKSIZE , .);
132 __stack_end__ = __stack_start__ + SIZEOF(.stack);
134 /* .stack_irq section */
136 .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
138 __stack_irq_start__ = .;
140 . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
142 __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
144 /* .stack_fiq section */
146 .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
148 __stack_fiq_start__ = .;
150 . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
152 __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
154 /* .stack_svc section */
156 .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
158 __stack_svc_start__ = .;
160 . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
162 __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
164 /* .stack_abt section */
166 .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
168 __stack_abt_start__ = .;
170 . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
172 __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
174 /* .stack_und section */
176 .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
178 __stack_und_start__ = .;
180 . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
182 __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
184 /* Stabs debugging sections. */
185 .stab 0 : { *(.stab) }
186 .stabstr 0 : { *(.stabstr) }
187 .stab.excl 0 : { *(.stab.excl) }
188 .stab.exclstr 0 : { *(.stab.exclstr) }
189 .stab.index 0 : { *(.stab.index) }
190 .stab.indexstr 0 : { *(.stab.indexstr) }
191 .comment 0 : { *(.comment) }
192 /* DWARF debug sections.
193 Symbols in the DWARF debugging sections are relative to the beginning
194 of the section so we begin them at 0. */
196 .debug 0 : { *(.debug) }
197 .line 0 : { *(.line) }
198 /* GNU DWARF 1 extensions */
199 .debug_srcinfo 0 : { *(.debug_srcinfo) }
200 .debug_sfnames 0 : { *(.debug_sfnames) }
201 /* DWARF 1.1 and DWARF 2 */
202 .debug_aranges 0 : { *(.debug_aranges) }
203 .debug_pubnames 0 : { *(.debug_pubnames) }
205 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
206 .debug_abbrev 0 : { *(.debug_abbrev) }
207 .debug_line 0 : { *(.debug_line) }
208 .debug_frame 0 : { *(.debug_frame) }
209 .debug_str 0 : { *(.debug_str) }
210 .debug_loc 0 : { *(.debug_loc) }
211 .debug_macinfo 0 : { *(.debug_macinfo) }
212 /* SGI/MIPS DWARF 2 extensions */
213 .debug_weaknames 0 : { *(.debug_weaknames) }
214 .debug_funcnames 0 : { *(.debug_funcnames) }
215 .debug_typenames 0 : { *(.debug_typenames) }
216 .debug_varnames 0 : { *(.debug_varnames) }