]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_CS/LPC11U24.ld
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_NXP / TARGET_LPC11UXX / TOOLCHAIN_GCC_CS / LPC11U24.ld
1 /* Linker script for mbed LPC1768
2 *
3 * Version:CodeSourcery Sourcery G++ Lite 2007q3-53
4 * BugURL:https://support.codesourcery.com/GNUToolchain/
5 *
6 * Copyright 2007 CodeSourcery.
7 *
8 * The authors hereby grant permission to use, copy, modify, distribute,
9 * and license this software and its documentation for any purpose, provided
10 * that existing copyright notices are retained in all copies and that this
11 * notice is included verbatim in any distributions. No written agreement,
12 * license, or royalty fee is required for any of the authorized uses.
13 * Modifications to this software may be copyrighted by their authors
14 * and need not follow the licensing terms described here, provided that
15 * the new terms are clearly indicated on the first page of each file where
16 * they apply. */
17
18 OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
19 ENTRY(__cs3_reset_cortex_m)
20 SEARCH_DIR(.)
21
22 /*
23 ram ORIGIN: 8_byte_aligned(48 vect * 4 bytes) = 8_byte_aligned(0xC0) = 0xC0
24 ram LENGTH: 8KB - 0xC0 = 0xF40
25 */
26 MEMORY
27 {
28 rom (rx) : ORIGIN = 0x00000000, LENGTH = 32K
29
30 ram (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40
31 usb_ram (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800
32 }
33
34 /* These force the linker to search for particular symbols from
35 * the start of the link process and thus ensure the user's
36 * overrides are picked up
37 */
38 EXTERN(__cs3_reset_cortex_m)
39 EXTERN(__cs3_interrupt_vector_cortex_m)
40 EXTERN(__cs3_start_c main __cs3_stack __cs3_stack_size __cs3_heap_end)
41
42 PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram);
43 PROVIDE(__cs3_stack_size = __cs3_region_start_ram + __cs3_region_size_ram - _end);
44 PROVIDE(__cs3_heap_start = _end);
45 PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
46
47 SECTIONS
48 {
49 .text :
50 {
51 CREATE_OBJECT_SYMBOLS
52 __cs3_region_start_rom = .;
53 *(.cs3.region-head.rom)
54 __cs3_interrupt_vector = __cs3_interrupt_vector_cortex_m;
55 *(.cs3.interrupt_vector)
56 /* Make sure we pulled in an interrupt vector. */
57 ASSERT (. != __cs3_interrupt_vector_cortex_m, "No interrupt vector");
58 *(.rom)
59 *(.rom.b)
60
61 __cs3_reset = __cs3_reset_cortex_m;
62 *(.cs3.reset)
63 /* Make sure we pulled in some reset code. */
64 ASSERT (. != __cs3_reset, "No reset code");
65
66 *(.text .text.* .gnu.linkonce.t.*)
67 *(.plt)
68 *(.gnu.warning)
69 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
70
71 *(.rodata .rodata.* .gnu.linkonce.r.*)
72
73 *(.ARM.extab* .gnu.linkonce.armextab.*)
74 *(.gcc_except_table)
75 *(.eh_frame_hdr)
76 *(.eh_frame)
77
78 . = ALIGN(4);
79 KEEP(*(.init))
80
81 . = ALIGN(4);
82 __preinit_array_start = .;
83 KEEP (*(.preinit_array))
84 __preinit_array_end = .;
85
86 . = ALIGN(4);
87 __init_array_start = .;
88 KEEP (*(SORT(.init_array.*)))
89 KEEP (*(.init_array))
90 __init_array_end = .;
91
92 . = ALIGN(0x4);
93 KEEP (*crtbegin.o(.ctors))
94 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
95 KEEP (*(SORT(.ctors.*)))
96 KEEP (*crtend.o(.ctors))
97
98 . = ALIGN(4);
99 KEEP(*(.fini))
100
101 . = ALIGN(4);
102 __fini_array_start = .;
103 KEEP (*(.fini_array))
104 KEEP (*(SORT(.fini_array.*)))
105 __fini_array_end = .;
106
107 KEEP (*crtbegin.o(.dtors))
108 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
109 KEEP (*(SORT(.dtors.*)))
110 KEEP (*crtend.o(.dtors))
111
112 . = ALIGN(4);
113 __cs3_regions = .;
114 LONG (0)
115 LONG (__cs3_region_init_ram)
116 LONG (__cs3_region_start_ram)
117 LONG (__cs3_region_init_size_ram)
118 LONG (__cs3_region_zero_size_ram)
119 }
120
121 /* .ARM.exidx is sorted, so has to go in its own output section. */
122 __exidx_start = .;
123 .ARM.exidx :
124 {
125 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
126 } >rom
127 __exidx_end = .;
128 .text.align :
129 {
130 . = ALIGN(8);
131 _etext = .;
132 } >rom
133 __cs3_region_size_rom = LENGTH(rom);
134 __cs3_region_num = 1;
135
136 .data :
137 {
138 __cs3_region_start_ram = .;
139 *(.cs3.region-head.ram)
140 KEEP(*(.jcr))
141 *(.got.plt) *(.got)
142 *(.shdata)
143 *(.data .data.* .gnu.linkonce.d.*)
144 *(.ram)
145 . = ALIGN (8);
146 _edata = .;
147 } >ram AT>rom
148 .bss :
149 {
150 *(.shbss)
151 *(.bss .bss.* .gnu.linkonce.b.*)
152 *(COMMON)
153 *(.ram.b)
154 . = ALIGN (8);
155 _end = .;
156 __end = .;
157 } >ram AT>rom
158
159 .heap (NOLOAD) :
160 {
161 *(.heap)
162 } >ram
163 .stack (__cs3_stack - __cs3_stack_size) (NOLOAD):
164 {
165 *(.stack)
166 _estack = .;
167 PROVIDE(estack = .);
168 } >ram
169
170 __cs3_region_init_ram = LOADADDR (.data);
171 __cs3_region_init_size_ram = _edata - __cs3_region_start_ram;
172 __cs3_region_zero_size_ram = _end - _edata;
173 __cs3_region_size_ram = LENGTH(ram);
174 __cs3_region_num = 1;
175
176 .stab 0 (NOLOAD) : { *(.stab) }
177 .stabstr 0 (NOLOAD) : { *(.stabstr) }
178 /* DWARF debug sections.
179 * Symbols in the DWARF debugging sections are relative to the beginning
180 * of the section so we begin them at 0. */
181 /* DWARF 1 */
182 .debug 0 : { *(.debug) }
183 .line 0 : { *(.line) }
184 /* GNU DWARF 1 extensions */
185 .debug_srcinfo 0 : { *(.debug_srcinfo) }
186 .debug_sfnames 0 : { *(.debug_sfnames) }
187 /* DWARF 1.1 and DWARF 2 */
188 .debug_aranges 0 : { *(.debug_aranges) }
189 .debug_pubnames 0 : { *(.debug_pubnames) }
190 /* DWARF 2 */
191 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
192 .debug_abbrev 0 : { *(.debug_abbrev) }
193 .debug_line 0 : { *(.debug_line) }
194 .debug_frame 0 : { *(.debug_frame) }
195 .debug_str 0 : { *(.debug_str) }
196 .debug_loc 0 : { *(.debug_loc) }
197 .debug_macinfo 0 : { *(.debug_macinfo) }
198 /* SGI/MIPS DWARF 2 extensions */
199 .debug_weaknames 0 : { *(.debug_weaknames) }
200 .debug_funcnames 0 : { *(.debug_funcnames) }
201 .debug_typenames 0 : { *(.debug_typenames) }
202 .debug_varnames 0 : { *(.debug_varnames) }
203
204 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
205 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
206 /DISCARD/ : { *(.note.GNU-stack) }
207 }
Imprint / Impressum