1 /* Default linker script, for normal executables */
2 OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
6 text (rx) : ORIGIN = 0, LENGTH = 128K
7 data (rw!x) : ORIGIN = 0x800100, LENGTH = 0xff00
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 user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = 1K
16 /* Read-only sections, merged into text segment: */
18 .dynsym : { *(.dynsym) }
19 .dynstr : { *(.dynstr) }
20 .gnu.version : { *(.gnu.version) }
21 .gnu.version_d : { *(.gnu.version_d) }
22 .gnu.version_r : { *(.gnu.version_r) }
23 .rel.init : { *(.rel.init) }
24 .rela.init : { *(.rela.init) }
29 *(.rel.gnu.linkonce.t*)
35 *(.rela.gnu.linkonce.t*)
37 .rel.fini : { *(.rel.fini) }
38 .rela.fini : { *(.rela.fini) }
43 *(.rel.gnu.linkonce.r*)
49 *(.rela.gnu.linkonce.r*)
55 *(.rel.gnu.linkonce.d*)
61 *(.rela.gnu.linkonce.d*)
63 .rel.ctors : { *(.rel.ctors) }
64 .rela.ctors : { *(.rela.ctors) }
65 .rel.dtors : { *(.rel.dtors) }
66 .rela.dtors : { *(.rela.dtors) }
67 .rel.got : { *(.rel.got) }
68 .rela.got : { *(.rela.got) }
69 .rel.bss : { *(.rel.bss) }
70 .rela.bss : { *(.rela.bss) }
71 .rel.plt : { *(.rel.plt) }
72 .rela.plt : { *(.rela.plt) }
73 /* Internal text space or external memory. */
78 . = 256 + ALIGN(256); /* placeholder for misc microb infos */
79 /* For data that needs to reside in the lower 64k of progmem. */
81 /* PR 13812: Placing the trampolines here gives a better chance
82 that they will be in range of the code that uses them. */
84 __trampolines_start = . ;
85 /* The jump trampolines for the 16-bit limited relocs will reside here. */
88 __trampolines_end = . ;
91 /* For future tablejump instruction arrays for 3 byte pc devices.
92 We don't relax jump/call instructions within these sections. */
95 /* For code that needs to reside in the lower 128k progmem. */
104 KEEP(SORT(*)(.ctors))
105 KEEP(SORT(*)(.dtors))
106 /* From this point on, we don't bother about wether the insns are
107 below or above the 16 bits boundary. */
108 *(.init0) /* Start here after reset. */
112 *(.init2) /* Clear __zero_reg__, set up stack pointer. */
116 *(.init4) /* Initialize data and BSS. */
120 *(.init6) /* C++ constructors. */
126 *(.init9) /* Call main(). */
132 *(.fini9) /* _exit() starts here. */
138 *(.fini6) /* C++ destructors. */
150 *(.fini0) /* Infinite loop after program termination. */
156 PROVIDE (__data_start = .) ;
159 *(.rodata) /* We need to include .rodata here if gcc is used */
160 *(.rodata*) /* with -fdata-sections. */
164 PROVIDE (__data_end = .) ;
166 .bss ADDR(.data) + SIZEOF (.data) : AT (ADDR (.bss))
168 PROVIDE (__bss_start = .) ;
172 PROVIDE (__bss_end = .) ;
174 __data_load_start = LOADADDR(.data);
175 __data_load_end = __data_load_start + SIZEOF(.data);
176 /* Global data not cleared after reset. */
179 PROVIDE (__noinit_start = .) ;
181 PROVIDE (__noinit_end = .) ;
183 PROVIDE (__heap_start = .) ;
187 /* See .data above... */
208 KEEP(*(.user_signatures*))
210 /* Stabs debugging sections. */
211 .stab 0 : { *(.stab) }
212 .stabstr 0 : { *(.stabstr) }
213 .stab.excl 0 : { *(.stab.excl) }
214 .stab.exclstr 0 : { *(.stab.exclstr) }
215 .stab.index 0 : { *(.stab.index) }
216 .stab.indexstr 0 : { *(.stab.indexstr) }
217 .comment 0 : { *(.comment) }
218 .note.gnu.build-id : { *(.note.gnu.build-id) }
219 /* DWARF debug sections.
220 Symbols in the DWARF debugging sections are relative to the beginning
221 of the section so we begin them at 0. */
223 .debug 0 : { *(.debug) }
224 .line 0 : { *(.line) }
225 /* GNU DWARF 1 extensions */
226 .debug_srcinfo 0 : { *(.debug_srcinfo) }
227 .debug_sfnames 0 : { *(.debug_sfnames) }
228 /* DWARF 1.1 and DWARF 2 */
229 .debug_aranges 0 : { *(.debug_aranges) }
230 .debug_pubnames 0 : { *(.debug_pubnames) }
232 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
233 .debug_abbrev 0 : { *(.debug_abbrev) }
234 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
235 .debug_frame 0 : { *(.debug_frame) }
236 .debug_str 0 : { *(.debug_str) }
237 .debug_loc 0 : { *(.debug_loc) }
238 .debug_macinfo 0 : { *(.debug_macinfo) }
239 /* SGI/MIPS DWARF 2 extensions */
240 .debug_weaknames 0 : { *(.debug_weaknames) }
241 .debug_funcnames 0 : { *(.debug_funcnames) }
242 .debug_typenames 0 : { *(.debug_typenames) }
243 .debug_varnames 0 : { *(.debug_varnames) }
245 .debug_pubtypes 0 : { *(.debug_pubtypes) }
246 .debug_ranges 0 : { *(.debug_ranges) }
247 /* DWARF Extension. */
248 .debug_macro 0 : { *(.debug_macro) }