1 | OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
2 | OUTPUT_ARCH(arm)
|
3 | ENTRY(_start)
|
4 |
|
5 | MEMORY { /* memory map of LPC2468 */
|
6 | ROM (rx) : ORIGIN = 0x00000000, LENGTH = 512k
|
7 | RAM (rwx) : ORIGIN = 0x40000000, LENGTH = 64k
|
8 | }
|
9 |
|
10 | /* The sizes of the stacks used by the application. NOTE: you need to adjust */
|
11 | C_STACK_SIZE = 512;
|
12 | IRQ_STACK_SIZE = 0;
|
13 | FIQ_STACK_SIZE = 0;
|
14 | SVC_STACK_SIZE = 0;
|
15 | ABT_STACK_SIZE = 0;
|
16 | UND_STACK_SIZE = 0;
|
17 |
|
18 |
|
19 | SECTIONS {
|
20 |
|
21 | .reset : {
|
22 | *startup.o (.text) /* startup code (ARM vectors and reset handler) */
|
23 | . = ALIGN(0x4);
|
24 | } >ROM
|
25 |
|
26 | .ramvect : { /* used for vectors remapped to RAM */
|
27 | __ram_start = .;
|
28 | . = 0x40;
|
29 | } >RAM
|
30 |
|
31 | .fastcode : {
|
32 | __fastcode_load = LOADADDR (.fastcode);
|
33 | __fastcode_start = .;
|
34 |
|
35 | *(.glue_7t) *(.glue_7)
|
36 | *isr.o (.text.*)
|
37 | *(.text.fastcode)
|
38 | *(.text.Blinky_dispatch)
|
39 | /* add other modules here ... */
|
40 |
|
41 | . = ALIGN (4);
|
42 | __fastcode_end = .;
|
43 | } >RAM AT>ROM
|
44 |
|
45 | .text : {
|
46 | CREATE_OBJECT_SYMBOLS
|
47 | *(.text .text.* .gnu.linkonce.t.*)
|
48 | *(.plt)
|
49 | *(.gnu.warning)
|
50 | *(.glue_7t) *(.glue_7) /* NOTE: placed already in .fastcode */
|
51 |
|
52 | . = ALIGN (4);
|
53 | /* These are for static constructors and destructors under ELF */
|
54 | KEEP (*crtbegin.o(.ctors))
|
55 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
56 | KEEP (*(SORT(.ctors.*)))
|
57 | KEEP (*crtend.o(.ctors))
|
58 | KEEP (*crtbegin.o(.dtors))
|
59 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
60 | KEEP (*(SORT(.dtors.*)))
|
61 | KEEP (*crtend.o(.dtors))
|
62 |
|
63 | *(.rodata .rodata.* .gnu.linkonce.r.*)
|
64 |
|
65 | *(.ARM.extab* .gnu.linkonce.armextab.*)
|
66 | *(.gcc_except_table)
|
67 | *(.eh_frame_hdr)
|
68 | *(.eh_frame)
|
69 |
|
70 | *(.init)
|
71 | *(.fini)
|
72 |
|
73 | PROVIDE_HIDDEN (__preinit_array_start = .);
|
74 | KEEP (*(.preinit_array))
|
75 | PROVIDE_HIDDEN (__preinit_array_end = .);
|
76 | PROVIDE_HIDDEN (__init_array_start = .);
|
77 | KEEP (*(SORT(.init_array.*)))
|
78 | KEEP (*(.init_array))
|
79 | PROVIDE_HIDDEN (__init_array_end = .);
|
80 | PROVIDE_HIDDEN (__fini_array_start = .);
|
81 | KEEP (*(.fini_array))
|
82 | KEEP (*(SORT(.fini_array.*)))
|
83 | PROVIDE_HIDDEN (__fini_array_end = .);
|
84 | } >ROM
|
85 |
|
86 | /* .ARM.exidx is sorted, so has to go in its own output section. */
|
87 | .ARM.exidx : {
|
88 | __exidx_start = .;
|
89 | *(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
90 | __exidx_end = .;
|
91 | } >ROM
|
92 | _etext = .;
|
93 |
|
94 | .data : {
|
95 | __data_load = LOADADDR (.data);
|
96 | __data_start = .;
|
97 | KEEP(*(.jcr))
|
98 | *(.got.plt) *(.got)
|
99 | *(.shdata)
|
100 | *(.data .data.* .gnu.linkonce.d.*)
|
101 | . = ALIGN (4);
|
102 | _edata = .;
|
103 | } >RAM AT>ROM
|
104 |
|
105 | .bss : {
|
106 | __bss_start__ = . ;
|
107 | *(.shbss)
|
108 | *(.bss .bss.* .gnu.linkonce.b.*)
|
109 | *(COMMON)
|
110 | . = ALIGN (8);
|
111 | __bss_end__ = .;
|
112 | } >RAM
|
113 |
|
114 | .stack : {
|
115 | __stack_start__ = . ;
|
116 |
|
117 | . += IRQ_STACK_SIZE;
|
118 | . = ALIGN (4);
|
119 | __irq_stack_top__ = . ;
|
120 |
|
121 | . += FIQ_STACK_SIZE;
|
122 | . = ALIGN (4);
|
123 | __fiq_stack_top__ = . ;
|
124 |
|
125 | . += SVC_STACK_SIZE;
|
126 | . = ALIGN (4);
|
127 | __svc_stack_top__ = . ;
|
128 |
|
129 | . += ABT_STACK_SIZE;
|
130 | . = ALIGN (4);
|
131 | __abt_stack_top__ = . ;
|
132 |
|
133 | . += UND_STACK_SIZE;
|
134 | . = ALIGN (4);
|
135 | __und_stack_top__ = . ;
|
136 |
|
137 | . += C_STACK_SIZE;
|
138 | . = ALIGN (4);
|
139 | __c_stack_top__ = . ;
|
140 |
|
141 | __stack_end__ = .;
|
142 | } >RAM
|
143 |
|
144 | _end = . ;
|
145 | __end = . ;
|
146 | PROVIDE(end = .);
|
147 |
|
148 | .stab 0 (NOLOAD) : {
|
149 | *(.stab)
|
150 | }
|
151 |
|
152 | .stabstr 0 (NOLOAD) : {
|
153 | *(.stabstr)
|
154 | }
|
155 |
|
156 | /* DWARF debug sections.
|
157 | * Symbols in the DWARF debugging sections are relative to the beginning
|
158 | * of the section so we begin them at 0.
|
159 | */
|
160 | /* DWARF 1 */
|
161 | .debug 0 : { *(.debug) }
|
162 | .line 0 : { *(.line) }
|
163 | /* GNU DWARF 1 extensions */
|
164 | .debug_srcinfo 0 : { *(.debug_srcinfo) }
|
165 | .debug_sfnames 0 : { *(.debug_sfnames) }
|
166 | /* DWARF 1.1 and DWARF 2 */
|
167 | .debug_aranges 0 : { *(.debug_aranges) }
|
168 | .debug_pubnames 0 : { *(.debug_pubnames) }
|
169 | /* DWARF 2 */
|
170 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
171 | .debug_abbrev 0 : { *(.debug_abbrev) }
|
172 | .debug_line 0 : { *(.debug_line) }
|
173 | .debug_frame 0 : { *(.debug_frame) }
|
174 | .debug_str 0 : { *(.debug_str) }
|
175 | .debug_loc 0 : { *(.debug_loc) }
|
176 | .debug_macinfo 0 : { *(.debug_macinfo) }
|
177 | /* SGI/MIPS DWARF 2 extensions */
|
178 | .debug_weaknames 0 : { *(.debug_weaknames) }
|
179 | .debug_funcnames 0 : { *(.debug_funcnames) }
|
180 | .debug_typenames 0 : { *(.debug_typenames) }
|
181 | .debug_varnames 0 : { *(.debug_varnames) }
|
182 | .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
|
183 | .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
|
184 | /DISCARD/ : { *(.note.GNU-stack) }
|
185 | }
|
186 |
|
187 | /*** EOF ***/
|