1 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
5 /* Memory Definitions: */
8 Flash (rx) : ORIGIN = 0x00000000, LENGTH = 512k
9 Ram (rwx) : ORIGIN = 0x40000000, LENGTH = 32k
10 UsbRam (rw) : ORIGIN = 0x7FD00000, LENGTH = 8k
11 EthRam (rw) : ORIGIN = 0x7FE00000, LENGTH = 16k
12 CanRam (rw) : ORIGIN = 0xE0038000, LENGTH = 2k
13 BatRam (rw) : ORIGIN = 0xE0084000, LENGTH = 2k
22 Stack_Size_Total = UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + FIQ_Stack_Size + IRQ_Stack_Size;
24 /* Stack tops for each mode: */
25 __und_stack_top__ = __stacks_top__;
26 __abt_stack_top__ = __und_stack_top__ - UND_Stack_Size ;
27 __fiq_stack_top__ = __abt_stack_top__ - ABT_Stack_Size ;
28 __irq_stack_top__ = __fiq_stack_top__ - FIQ_Stack_Size ;
29 __svc_stack_top__ = __irq_stack_top__ - IRQ_Stack_Size ;
31 /* C-accessible symbols for memory address ranges: */
32 __FLASH_segment_start__ = ORIGIN( Flash );
33 __FLASH_segment_end__ = ORIGIN( Flash ) + LENGTH( Flash );
34 __SRAM_segment_start__ = ORIGIN( Ram );
35 __SRAM_segment_end__ = ORIGIN( Ram ) + LENGTH( Ram );
37 /* Stacks (full descending) at top of RAM, grows downward:
39 * __stack_min__ is used by the malloc implementation to ensure heap never collides
40 * with stack (assuming stack never grows beyond Stack_Size_Total in length) */
41 __stacks_top__ = __SRAM_segment_end__;
42 __stacks_min__ = __SRAM_segment_end__ - Stack_Size_Total;
46 /* first section is .text which is used for code */
49 __privileged_code_start__ = . ;
53 __privileged_code_end__ = .;
55 *( .text .text.* .gnu.linkonce.t.* )
58 *( .glue_7t ) *( .glue_7 ) *( .vfp11_veneer )
60 *( .rodata .rodata.* .gnu.linkonce.r.* )
62 *(.ARM.extab* .gnu.linkonce.armextab.*)
70 __preinit_array_start = . ;
71 KEEP( *( .preinit_array ) )
72 __preinit_array_end = . ;
74 __init_array_start = . ;
75 KEEP( *( SORT( .init_array.* ) ) )
76 KEEP( *( .init_array ) )
77 __init_array_end = . ;
80 KEEP( *crtbegin.o( .ctors ) )
81 KEEP( *( EXCLUDE_FILE( *crtend.o ) .ctors ) )
82 KEEP( *( SORT( .ctors.* ) ) )
83 KEEP( *crtend.o( .ctors ) )
88 __fini_array_start = . ;
89 KEEP( *( .fini_array ) )
90 KEEP( *( SORT( .fini_array.* ) ) )
91 __fini_array_end = . ;
93 KEEP( *crtbegin.o( .dtors ) )
94 KEEP( *( EXCLUDE_FILE( *crtend.o ) .dtors ) )
95 KEEP( *( SORT( .dtors.* ) ) )
96 KEEP( *crtend.o( .dtors ) )
102 *( .ARM.exidx* .gnu.linkonce.armexidx.* )
106 .text.align : { . = ALIGN( 8 ) ; } >Flash /* Alignment schenanigans */
109 /* .bss section -- used for uninitialized data */
110 /* Located at the start of RAM */
113 *crt0.o( .ram_vectors )
115 __user_bss_start__ = . ;
117 __user_bss_end__ = . ;
120 *( .bss .bss.* .gnu.linkonce.b.* )
128 /* .data section -- used for initialized data */
132 *( .got.plt ) *( .got )
134 *( .data .data.* .gnu.linkonce.d.* )
140 __data_init_start__ = LOADADDR( .data ) ;
142 /* Heap starts here and grows up in memory */
148 .stab 0 (NOLOAD) : { *(.stab) }
149 .stabstr 0 (NOLOAD) : { *(.stabstr) }
150 /* DWARF debug sections. */
151 /* Symbols in the DWARF debugging sections are relative to the */
152 /* beginning of the section so we begin them at 0. */
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) }
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) }
176 .debug_pubtypes 0 : { *(.debug_pubtypes) }
177 .debug_ranges 0 : { *(.debug_ranges) }
179 .note.gnu.arm.ident 0 : { KEEP( *( .note.gnu.arm.ident ) ) }
180 .ARM.attributes 0 : {
181 KEEP( *( .ARM.attributes ) )
182 KEEP( *( .gnu.attributes ) )
184 /DISCARD/ : { *( .note.GNU-stack ) }
186 /* C data can be defined as being in special purpose RAMs using
187 * __attribute__ ((section ("ethram"))) for example. */