2 OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
7 text (rx) : ORIGIN = $TEXT_ORIGIN, LENGTH = $TEXT_LENGTH
8 data (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = $DATA_LENGTH
10 /* Provide offsets for config, lock and signature to match
11 production file format. Ignore offsets in datasheet. */
13 config (rw!x) : ORIGIN = 0x820000, LENGTH = 2
14 lock (rw!x) : ORIGIN = 0x830000, LENGTH = 2
15 signature (rw!x) : ORIGIN = 0x840000, LENGTH = 4
20 /* Read-only sections, merged into text segment: */
21 ${TEXT_DYNAMIC+${DYNAMIC}}
22 .hash ${RELOCATING-0} : { *(.hash) }
23 .dynsym ${RELOCATING-0} : { *(.dynsym) }
24 .dynstr ${RELOCATING-0} : { *(.dynstr) }
25 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
26 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
27 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
29 .rel.init ${RELOCATING-0} : { *(.rel.init) }
30 .rela.init ${RELOCATING-0} : { *(.rela.init) }
31 .rel.text ${RELOCATING-0} :
34 ${RELOCATING+*(.rel.text.*)}
35 ${RELOCATING+*(.rel.gnu.linkonce.t*)}
37 .rela.text ${RELOCATING-0} :
40 ${RELOCATING+*(.rela.text.*)}
41 ${RELOCATING+*(.rela.gnu.linkonce.t*)}
43 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
44 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
45 .rel.rodata ${RELOCATING-0} :
48 ${RELOCATING+*(.rel.rodata.*)}
49 ${RELOCATING+*(.rel.gnu.linkonce.r*)}
51 .rela.rodata ${RELOCATING-0} :
54 ${RELOCATING+*(.rela.rodata.*)}
55 ${RELOCATING+*(.rela.gnu.linkonce.r*)}
57 .rel.data ${RELOCATING-0} :
60 ${RELOCATING+*(.rel.data.*)}
61 ${RELOCATING+*(.rel.gnu.linkonce.d*)}
63 .rela.data ${RELOCATING-0} :
66 ${RELOCATING+*(.rela.data.*)}
67 ${RELOCATING+*(.rela.gnu.linkonce.d*)}
69 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
70 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
71 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
72 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
73 .rel.got ${RELOCATING-0} : { *(.rel.got) }
74 .rela.got ${RELOCATING-0} : { *(.rela.got) }
75 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
76 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
77 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
78 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
80 /* Internal text space or external memory. */
81 .text ${RELOCATING-0} : ${RELOCATING+ AT (0x0)}
86 /* For data that needs to reside in the lower 64k of progmem. */
89 ${RELOCATING+. = ALIGN(2);}
91 ${CONSTRUCTING+ __trampolines_start = . ; }
92 /* The jump trampolines for the 16-bit limited relocs will reside here. */
95 ${CONSTRUCTING+ __trampolines_end = . ; }
97 /* For future tablejump instruction arrays for 3 byte pc devices.
98 We don't relax jump/call instructions within these sections. */
102 /* For code that needs to reside in the lower 128k progmem. */
106 ${CONSTRUCTING+ __ctors_start = . ; }
107 ${CONSTRUCTING+ *(.ctors) }
108 ${CONSTRUCTING+ __ctors_end = . ; }
109 ${CONSTRUCTING+ __dtors_start = . ; }
110 ${CONSTRUCTING+ *(.dtors) }
111 ${CONSTRUCTING+ __dtors_end = . ; }
112 KEEP(SORT(*)(.ctors))
113 KEEP(SORT(*)(.dtors))
115 /* From this point on, we don't bother about wether the insns are
116 below or above the 16 bits boundary. */
117 *(.init0) /* Start here after reset. */
121 *(.init2) /* Clear __zero_reg__, set up stack pointer. */
125 *(.init4) /* Initialize data and BSS. */
129 *(.init6) /* C++ constructors. */
135 *(.init9) /* Call main(). */
138 ${RELOCATING+. = ALIGN(2);}
140 ${RELOCATING+. = ALIGN(2);}
141 *(.fini9) /* _exit() starts here. */
147 *(.fini6) /* C++ destructors. */
159 *(.fini0) /* Infinite loop after program termination. */
161 ${RELOCATING+ _etext = . ; }
162 } ${RELOCATING+ > text}
164 .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
166 ${RELOCATING+ PROVIDE (__data_start = .) ; }
170 *(.rodata) /* We need to include .rodata here if gcc is used */
171 *(.rodata*) /* with -fdata-sections. */
173 ${RELOCATING+. = ALIGN(2);}
174 ${RELOCATING+ _edata = . ; }
175 ${RELOCATING+ PROVIDE (__data_end = .) ; }
176 } ${RELOCATING+ > data}
178 .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
180 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
184 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
185 } ${RELOCATING+ > data}
187 ${RELOCATING+ __data_load_start = LOADADDR(.data); }
188 ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
190 /* Global data not cleared after reset. */
191 .noinit ${RELOCATING-0}:
193 ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
195 ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
196 ${RELOCATING+ _end = . ; }
197 ${RELOCATING+ PROVIDE (__heap_start = .) ; }
198 } ${RELOCATING+ > data}
200 .lock ${RELOCATING-0}:
203 } ${RELOCATING+ > lock}
205 .signature ${RELOCATING-0}:
208 } ${RELOCATING+ > signature}
210 .config ${RELOCATING-0}:
213 } ${RELOCATING+ > config}
215 /* Stabs debugging sections. */
216 .stab 0 : { *(.stab) }
217 .stabstr 0 : { *(.stabstr) }
218 .stab.excl 0 : { *(.stab.excl) }
219 .stab.exclstr 0 : { *(.stab.exclstr) }
220 .stab.index 0 : { *(.stab.index) }
221 .stab.indexstr 0 : { *(.stab.indexstr) }
222 .comment 0 : { *(.comment) }
224 /* DWARF debug sections.
225 Symbols in the DWARF debugging sections are relative to the beginning
226 of the section so we begin them at 0. */
229 .debug 0 : { *(.debug) }
230 .line 0 : { *(.line) }
232 /* GNU DWARF 1 extensions */
233 .debug_srcinfo 0 : { *(.debug_srcinfo) }
234 .debug_sfnames 0 : { *(.debug_sfnames) }
236 /* DWARF 1.1 and DWARF 2 */
237 .debug_aranges 0 : { *(.debug_aranges) }
238 .debug_pubnames 0 : { *(.debug_pubnames) }
241 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
242 .debug_abbrev 0 : { *(.debug_abbrev) }
243 .debug_line 0 : { *(.debug_line) }
244 .debug_frame 0 : { *(.debug_frame) }
245 .debug_str 0 : { *(.debug_str) }
246 .debug_loc 0 : { *(.debug_loc) }
247 .debug_macinfo 0 : { *(.debug_macinfo) }