2 OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
7 text (rx) : ORIGIN = 0, LENGTH = $TEXT_LENGTH
8 data (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = $DATA_LENGTH
9 eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K
10 fuse (rw!x) : ORIGIN = 0x820000, LENGTH = 1K
11 lock (rw!x) : ORIGIN = 0x830000, LENGTH = 1K
12 signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K
17 /* Read-only sections, merged into text segment: */
18 ${TEXT_DYNAMIC+${DYNAMIC}}
19 .hash ${RELOCATING-0} : { *(.hash) }
20 .dynsym ${RELOCATING-0} : { *(.dynsym) }
21 .dynstr ${RELOCATING-0} : { *(.dynstr) }
22 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
23 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
24 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
26 .rel.init ${RELOCATING-0} : { *(.rel.init) }
27 .rela.init ${RELOCATING-0} : { *(.rela.init) }
28 .rel.text ${RELOCATING-0} :
31 ${RELOCATING+*(.rel.text.*)}
32 ${RELOCATING+*(.rel.gnu.linkonce.t*)}
34 .rela.text ${RELOCATING-0} :
37 ${RELOCATING+*(.rela.text.*)}
38 ${RELOCATING+*(.rela.gnu.linkonce.t*)}
40 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
41 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
42 .rel.rodata ${RELOCATING-0} :
45 ${RELOCATING+*(.rel.rodata.*)}
46 ${RELOCATING+*(.rel.gnu.linkonce.r*)}
48 .rela.rodata ${RELOCATING-0} :
51 ${RELOCATING+*(.rela.rodata.*)}
52 ${RELOCATING+*(.rela.gnu.linkonce.r*)}
54 .rel.data ${RELOCATING-0} :
57 ${RELOCATING+*(.rel.data.*)}
58 ${RELOCATING+*(.rel.gnu.linkonce.d*)}
60 .rela.data ${RELOCATING-0} :
63 ${RELOCATING+*(.rela.data.*)}
64 ${RELOCATING+*(.rela.gnu.linkonce.d*)}
66 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
67 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
68 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
69 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
70 .rel.got ${RELOCATING-0} : { *(.rel.got) }
71 .rela.got ${RELOCATING-0} : { *(.rela.got) }
72 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
73 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
74 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
75 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
77 /* Internal text space or external memory. */
78 .text ${RELOCATING-0} :
83 /* For data that needs to reside in the lower 64k of progmem. */
84 ${RELOCATING+ *(.progmem.gcc*)}
86 /* PR 13812: Placing the trampolines here gives a better chance
87 that they will be in range of the code that uses them. */
88 ${RELOCATING+. = ALIGN(2);}
89 ${CONSTRUCTING+ __trampolines_start = . ; }
90 /* The jump trampolines for the 16-bit limited relocs will reside here. */
92 ${RELOCATING+ *(.trampolines*)}
93 ${CONSTRUCTING+ __trampolines_end = . ; }
95 ${RELOCATING+ *(.progmem*)}
97 ${RELOCATING+. = ALIGN(2);}
99 /* For future tablejump instruction arrays for 3 byte pc devices.
100 We don't relax jump/call instructions within these sections. */
102 ${RELOCATING+ *(.jumptables*)}
104 /* For code that needs to reside in the lower 128k progmem. */
106 ${RELOCATING+ *(.lowtext*)}
108 ${CONSTRUCTING+ __ctors_start = . ; }
109 ${CONSTRUCTING+ *(.ctors) }
110 ${CONSTRUCTING+ __ctors_end = . ; }
111 ${CONSTRUCTING+ __dtors_start = . ; }
112 ${CONSTRUCTING+ *(.dtors) }
113 ${CONSTRUCTING+ __dtors_end = . ; }
114 KEEP(SORT(*)(.ctors))
115 KEEP(SORT(*)(.dtors))
117 /* From this point on, we don't bother about wether the insns are
118 below or above the 16 bits boundary. */
119 *(.init0) /* Start here after reset. */
123 *(.init2) /* Clear __zero_reg__, set up stack pointer. */
127 *(.init4) /* Initialize data and BSS. */
131 *(.init6) /* C++ constructors. */
137 *(.init9) /* Call main(). */
140 ${RELOCATING+. = ALIGN(2);}
141 ${RELOCATING+ *(.text.*)}
142 ${RELOCATING+. = ALIGN(2);}
143 *(.fini9) /* _exit() starts here. */
149 *(.fini6) /* C++ destructors. */
161 *(.fini0) /* Infinite loop after program termination. */
163 ${RELOCATING+ _etext = . ; }
164 } ${RELOCATING+ > text}
166 .data ${RELOCATING-0} :
168 ${RELOCATING+ PROVIDE (__data_start = .) ; }
170 ${RELOCATING+ *(.data*)}
171 *(.rodata) /* We need to include .rodata here if gcc is used */
172 ${RELOCATING+ *(.rodata*)} /* with -fdata-sections. */
174 ${RELOCATING+. = ALIGN(2);}
175 ${RELOCATING+ _edata = . ; }
176 ${RELOCATING+ PROVIDE (__data_end = .) ; }
177 } ${RELOCATING+ > data ${RELOCATING+AT> text}}
179 .bss ${RELOCATING+ ADDR(.data) + SIZEOF (.data)} ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
181 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
183 ${RELOCATING+ *(.bss*)}
185 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
186 } ${RELOCATING+ > data}
188 ${RELOCATING+ __data_load_start = LOADADDR(.data); }
189 ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
191 /* Global data not cleared after reset. */
192 .noinit ${RELOCATING-0}:
194 ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
196 ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
197 ${RELOCATING+ _end = . ; }
198 ${RELOCATING+ PROVIDE (__heap_start = .) ; }
199 } ${RELOCATING+ > data}
201 .eeprom ${RELOCATING-0}:
203 /* See .data above... */
205 ${RELOCATING+ __eeprom_end = . ; }
206 } ${RELOCATING+ > eeprom}
208 .fuse ${RELOCATING-0}:
214 } ${RELOCATING+ > fuse}
216 .lock ${RELOCATING-0}:
219 } ${RELOCATING+ > lock}
221 .signature ${RELOCATING-0}:
224 } ${RELOCATING+ > signature}
226 /* Stabs debugging sections. */
227 .stab 0 : { *(.stab) }
228 .stabstr 0 : { *(.stabstr) }
229 .stab.excl 0 : { *(.stab.excl) }
230 .stab.exclstr 0 : { *(.stab.exclstr) }
231 .stab.index 0 : { *(.stab.index) }
232 .stab.indexstr 0 : { *(.stab.indexstr) }
233 .comment 0 : { *(.comment) }
234 .note.gnu.build-id : { *(.note.gnu.build-id) }
237 . $srcdir/scripttempl/DWARF.sc