]> git.zerfleddert.de Git - fnordlicht-mini/blob - firmware/fnordlicht-bootloader/ldscripts/avr4.x
cc00f3877719b18c3f096fdafa3442710efac393
[fnordlicht-mini] / firmware / fnordlicht-bootloader / ldscripts / avr4.x
1 /* Default linker script, for normal executables */
2 OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
3 OUTPUT_ARCH(avr:4)
4 MEMORY
5 {
6 text (rx) : ORIGIN = 0, LENGTH = 8K
7 data (rw!x) : ORIGIN = 0x800060, LENGTH = 0xffa0
8 eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K
9 fuse (rw!x) : ORIGIN = 0x820000, LENGTH = 1K
10 lock (rw!x) : ORIGIN = 0x830000, LENGTH = 1K
11 signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K
12 }
13 SECTIONS
14 {
15 /* Read-only sections, merged into text segment: */
16 .hash : { *(.hash) }
17 .dynsym : { *(.dynsym) }
18 .dynstr : { *(.dynstr) }
19 .gnu.version : { *(.gnu.version) }
20 .gnu.version_d : { *(.gnu.version_d) }
21 .gnu.version_r : { *(.gnu.version_r) }
22 .rel.init : { *(.rel.init) }
23 .rela.init : { *(.rela.init) }
24 .rel.text :
25 {
26 *(.rel.text)
27 *(.rel.text.*)
28 *(.rel.gnu.linkonce.t*)
29 }
30 .rela.text :
31 {
32 *(.rela.text)
33 *(.rela.text.*)
34 *(.rela.gnu.linkonce.t*)
35 }
36 .rel.fini : { *(.rel.fini) }
37 .rela.fini : { *(.rela.fini) }
38 .rel.rodata :
39 {
40 *(.rel.rodata)
41 *(.rel.rodata.*)
42 *(.rel.gnu.linkonce.r*)
43 }
44 .rela.rodata :
45 {
46 *(.rela.rodata)
47 *(.rela.rodata.*)
48 *(.rela.gnu.linkonce.r*)
49 }
50 .rel.data :
51 {
52 *(.rel.data)
53 *(.rel.data.*)
54 *(.rel.gnu.linkonce.d*)
55 }
56 .rela.data :
57 {
58 *(.rela.data)
59 *(.rela.data.*)
60 *(.rela.gnu.linkonce.d*)
61 }
62 .rel.ctors : { *(.rel.ctors) }
63 .rela.ctors : { *(.rela.ctors) }
64 .rel.dtors : { *(.rel.dtors) }
65 .rela.dtors : { *(.rela.dtors) }
66 .rel.got : { *(.rel.got) }
67 .rela.got : { *(.rela.got) }
68 .rel.bss : { *(.rel.bss) }
69 .rela.bss : { *(.rela.bss) }
70 .rel.plt : { *(.rel.plt) }
71 .rela.plt : { *(.rela.plt) }
72
73 /* discard default interrupt jumptable */
74 /DISCARD/ : { *(.vectors) }
75
76 /* Internal text space or external memory. */
77 .text :
78 {
79 *(.vectors.bootloader)
80 KEEP(*(.vectors.bootloader))
81 /* For data that needs to reside in the lower 64k of progmem. */
82 *(.progmem.gcc*)
83 *(.progmem*)
84 . = ALIGN(2);
85 __trampolines_start = . ;
86 /* The jump trampolines for the 16-bit limited relocs will reside here. */
87 *(.trampolines)
88 *(.trampolines*)
89 __trampolines_end = . ;
90 /* For future tablejump instruction arrays for 3 byte pc devices.
91 We don't relax jump/call instructions within these sections. */
92 *(.jumptables)
93 *(.jumptables*)
94 /* For code that needs to reside in the lower 128k progmem. */
95 *(.lowtext)
96 *(.lowtext*)
97 __ctors_start = . ;
98 *(.ctors)
99 __ctors_end = . ;
100 __dtors_start = . ;
101 *(.dtors)
102 __dtors_end = . ;
103 KEEP(SORT(*)(.ctors))
104 KEEP(SORT(*)(.dtors))
105 /* From this point on, we don't bother about wether the insns are
106 below or above the 16 bits boundary. */
107 *(.init0) /* Start here after reset. */
108 KEEP (*(.init0))
109 *(.init1)
110 KEEP (*(.init1))
111 *(.init2) /* Clear __zero_reg__, set up stack pointer. */
112 KEEP (*(.init2))
113 *(.init3)
114 KEEP (*(.init3))
115 *(.init4) /* Initialize data and BSS. */
116 KEEP (*(.init4))
117 *(.init5)
118 KEEP (*(.init5))
119 *(.init6) /* C++ constructors. */
120 KEEP (*(.init6))
121 *(.init7)
122 KEEP (*(.init7))
123 *(.init8)
124 KEEP (*(.init8))
125 *(.init9) /* Call main(). */
126 KEEP (*(.init9))
127 *(.text)
128 . = ALIGN(2);
129 *(.text.*)
130 . = ALIGN(2);
131 *(.fini9) /* _exit() starts here. */
132 KEEP (*(.fini9))
133 *(.fini8)
134 KEEP (*(.fini8))
135 *(.fini7)
136 KEEP (*(.fini7))
137 *(.fini6) /* C++ destructors. */
138 KEEP (*(.fini6))
139 *(.fini5)
140 KEEP (*(.fini5))
141 *(.fini4)
142 KEEP (*(.fini4))
143 *(.fini3)
144 KEEP (*(.fini3))
145 *(.fini2)
146 KEEP (*(.fini2))
147 *(.fini1)
148 KEEP (*(.fini1))
149 *(.fini0) /* Infinite loop after program termination. */
150 KEEP (*(.fini0))
151 _etext = . ;
152 } > text
153 .data : AT (ADDR (.text) + SIZEOF (.text))
154 {
155 PROVIDE (__data_start = .) ;
156 *(.data)
157 *(.data*)
158 *(.rodata) /* We need to include .rodata here if gcc is used */
159 *(.rodata*) /* with -fdata-sections. */
160 *(.gnu.linkonce.d*)
161 . = ALIGN(2);
162 _edata = . ;
163 PROVIDE (__data_end = .) ;
164 } > data
165 .bss : AT (ADDR (.bss))
166 {
167 PROVIDE (__bss_start = .) ;
168 *(.bss)
169 *(.bss*)
170 *(COMMON)
171 PROVIDE (__bss_end = .) ;
172 } > data
173 __data_load_start = LOADADDR(.data);
174 __data_load_end = __data_load_start + SIZEOF(.data);
175 /* Global data not cleared after reset. */
176 .noinit :
177 {
178 PROVIDE (__noinit_start = .) ;
179 *(.noinit*)
180 PROVIDE (__noinit_end = .) ;
181 _end = . ;
182 PROVIDE (__heap_start = .) ;
183 } > data
184 .eeprom :
185 {
186 *(.eeprom*)
187 __eeprom_end = . ;
188 } > eeprom
189 .fuse :
190 {
191 KEEP(*(.fuse))
192 KEEP(*(.lfuse))
193 KEEP(*(.hfuse))
194 KEEP(*(.efuse))
195 } > fuse
196 .lock :
197 {
198 KEEP(*(.lock*))
199 } > lock
200 .signature :
201 {
202 KEEP(*(.signature*))
203 } > signature
204 /* Stabs debugging sections. */
205 .stab 0 : { *(.stab) }
206 .stabstr 0 : { *(.stabstr) }
207 .stab.excl 0 : { *(.stab.excl) }
208 .stab.exclstr 0 : { *(.stab.exclstr) }
209 .stab.index 0 : { *(.stab.index) }
210 .stab.indexstr 0 : { *(.stab.indexstr) }
211 .comment 0 : { *(.comment) }
212 /* DWARF debug sections.
213 Symbols in the DWARF debugging sections are relative to the beginning
214 of the section so we begin them at 0. */
215 /* DWARF 1 */
216 .debug 0 : { *(.debug) }
217 .line 0 : { *(.line) }
218 /* GNU DWARF 1 extensions */
219 .debug_srcinfo 0 : { *(.debug_srcinfo) }
220 .debug_sfnames 0 : { *(.debug_sfnames) }
221 /* DWARF 1.1 and DWARF 2 */
222 .debug_aranges 0 : { *(.debug_aranges) }
223 .debug_pubnames 0 : { *(.debug_pubnames) }
224 /* DWARF 2 */
225 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
226 .debug_abbrev 0 : { *(.debug_abbrev) }
227 .debug_line 0 : { *(.debug_line) }
228 .debug_frame 0 : { *(.debug_frame) }
229 .debug_str 0 : { *(.debug_str) }
230 .debug_loc 0 : { *(.debug_loc) }
231 .debug_macinfo 0 : { *(.debug_macinfo) }
232 }
Impressum, Datenschutz