1 /* Default linker script, for normal executables */
2 OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
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
15 /* Read-only sections, merged into text segment: */
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) }
28 *(.rel.gnu.linkonce.t*)
34 *(.rela.gnu.linkonce.t*)
36 .rel.fini : { *(.rel.fini) }
37 .rela.fini : { *(.rela.fini) }
42 *(.rel.gnu.linkonce.r*)
48 *(.rela.gnu.linkonce.r*)
54 *(.rel.gnu.linkonce.d*)
60 *(.rela.gnu.linkonce.d*)
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) }
73 /* discard default interrupt jumptable */
74 /DISCARD/ : { *(.vectors) }
76 /* Internal text space or external memory. */
79 *(.vectors.bootloader)
80 KEEP(*(.vectors.bootloader))
81 /* For data that needs to reside in the lower 64k of progmem. */
85 __trampolines_start = . ;
86 /* The jump trampolines for the 16-bit limited relocs will reside here. */
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. */
94 /* For code that needs to reside in the lower 128k progmem. */
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. */
111 *(.init2) /* Clear __zero_reg__, set up stack pointer. */
115 *(.init4) /* Initialize data and BSS. */
119 *(.init6) /* C++ constructors. */
125 *(.init9) /* Call main(). */
131 *(.fini9) /* _exit() starts here. */
137 *(.fini6) /* C++ destructors. */
149 *(.fini0) /* Infinite loop after program termination. */
153 .data : AT (ADDR (.text) + SIZEOF (.text))
155 PROVIDE (__data_start = .) ;
158 *(.rodata) /* We need to include .rodata here if gcc is used */
159 *(.rodata*) /* with -fdata-sections. */
163 PROVIDE (__data_end = .) ;
165 .bss : AT (ADDR (.bss))
167 PROVIDE (__bss_start = .) ;
171 PROVIDE (__bss_end = .) ;
173 __data_load_start = LOADADDR(.data);
174 __data_load_end = __data_load_start + SIZEOF(.data);
175 /* Global data not cleared after reset. */
178 PROVIDE (__noinit_start = .) ;
180 PROVIDE (__noinit_end = .) ;
182 PROVIDE (__heap_start = .) ;
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. */
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) }
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) }