3 HEAP_SECTION_MSP430=" "
6 if test ${GOT_HEAP_MSP-0} -ne 0
8 HEAP_SECTION_MSP430=".heap ${RELOCATING-0} :
10 ${RELOCATING+ PROVIDE (__heap_data_start = .) ; }
12 ${RELOCATING+ PROVIDE (_heap_data_end = .) ; }
13 ${RELOCATING+. = ALIGN(2);}
14 ${RELOCATING+ PROVIDE (__heap_bottom = .) ; }
15 ${RELOCATING+ PROVIDE (__heap_top = ${HEAP_START} + ${HEAP_LENGTH}) ; }
16 } ${RELOCATING+ > heap}"
17 HEAP_MEMORY_MSP430="heap(rwx) : ORIGIN = $HEAP_START, LENGTH = $HEAP_LENGTH"
22 OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
27 text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE
28 data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE
29 vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
30 bootloader(rx) : ORIGIN = 0x0c00, LENGTH = 1K
31 infomem(rx) : ORIGIN = 0x1000, LENGTH = 256
32 infomemnobits(rx) : ORIGIN = 0x1000, LENGTH = 256
38 /* Read-only sections, merged into text segment. */
39 ${TEXT_DYNAMIC+${DYNAMIC}}
40 .hash ${RELOCATING-0} : { *(.hash) }
41 .dynsym ${RELOCATING-0} : { *(.dynsym) }
42 .dynstr ${RELOCATING-0} : { *(.dynstr) }
43 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
44 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
45 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
47 .rel.init ${RELOCATING-0} : { *(.rel.init) }
48 .rela.init ${RELOCATING-0} : { *(.rela.init) }
49 .rel.text ${RELOCATING-0} :
52 ${RELOCATING+*(.rel.text.*)}
53 ${RELOCATING+*(.rel.gnu.linkonce.t*)}
55 .rela.text ${RELOCATING-0} :
58 ${RELOCATING+*(.rela.text.*)}
59 ${RELOCATING+*(.rela.gnu.linkonce.t*)}
61 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
62 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
63 .rel.rodata ${RELOCATING-0} :
66 ${RELOCATING+*(.rel.rodata.*)}
67 ${RELOCATING+*(.rel.gnu.linkonce.r*)}
69 .rela.rodata ${RELOCATING-0} :
72 ${RELOCATING+*(.rela.rodata.*)}
73 ${RELOCATING+*(.rela.gnu.linkonce.r*)}
75 .rel.data ${RELOCATING-0} :
78 ${RELOCATING+*(.rel.data.*)}
79 ${RELOCATING+*(.rel.gnu.linkonce.d*)}
81 .rela.data ${RELOCATING-0} :
84 ${RELOCATING+*(.rela.data.*)}
85 ${RELOCATING+*(.rela.gnu.linkonce.d*)}
87 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
88 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
89 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
90 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
91 .rel.got ${RELOCATING-0} : { *(.rel.got) }
92 .rela.got ${RELOCATING-0} : { *(.rela.got) }
93 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
94 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
95 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
96 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
98 /* Internal text space. */
101 ${RELOCATING+. = ALIGN(2);}
103 *(.init0) /* Start here after reset. */
105 *(.init2) /* Copy data loop */
107 *(.init4) /* Clear bss */
109 *(.init6) /* C++ constructors. */
112 *(.init9) /* Call main(). */
114 ${CONSTRUCTING+ __ctors_start = . ; }
115 ${CONSTRUCTING+ *(.ctors) }
116 ${CONSTRUCTING+ __ctors_end = . ; }
117 ${CONSTRUCTING+ __dtors_start = . ; }
118 ${CONSTRUCTING+ *(.dtors) }
119 ${CONSTRUCTING+ __dtors_end = . ; }
121 ${RELOCATING+. = ALIGN(2);}
123 ${RELOCATING+. = ALIGN(2);}
126 ${RELOCATING+. = ALIGN(2);}
130 *(.fini6) /* C++ destructors. */
136 *(.fini0) /* Infinite loop after program termination. */
140 } ${RELOCATING+ > text}
142 .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
144 ${RELOCATING+ PROVIDE (__data_start = .) ; }
145 ${RELOCATING+. = ALIGN(2);}
147 ${RELOCATING+. = ALIGN(2);}
149 ${RELOCATING+. = ALIGN(2);}
150 ${RELOCATING+ _edata = . ; }
151 } ${RELOCATING+ > data}
154 .bootloader ${RELOCATING-0} :
156 ${RELOCATING+ PROVIDE (__boot_start = .) ; }
158 ${RELOCATING+. = ALIGN(2);}
160 } ${RELOCATING+ > bootloader}
162 /* Information memory. */
163 .infomem ${RELOCATING-0} :
166 ${RELOCATING+. = ALIGN(2);}
168 } ${RELOCATING+ > infomem}
170 /* Information memory (not loaded into MPU). */
171 .infomemnobits ${RELOCATING-0} :
174 ${RELOCATING+. = ALIGN(2);}
176 } ${RELOCATING+ > infomemnobits}
178 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
180 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
183 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
184 ${RELOCATING+ _end = . ; }
185 } ${RELOCATING+ > data}
187 .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
189 ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
192 ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
193 ${RELOCATING+ _end = . ; }
194 } ${RELOCATING+ > data}
196 .vectors ${RELOCATING-0}:
198 ${RELOCATING+ PROVIDE (__vectors_start = .) ; }
200 ${RELOCATING+ _vectors_end = . ; }
201 } ${RELOCATING+ > vectors}
203 ${HEAP_SECTION_MSP430}
205 /* Stabs debugging sections. */
206 .stab 0 : { *(.stab) }
207 .stabstr 0 : { *(.stabstr) }
208 .stab.excl 0 : { *(.stab.excl) }
209 .stab.exclstr 0 : { *(.stab.exclstr) }
210 .stab.index 0 : { *(.stab.index) }
211 .stab.indexstr 0 : { *(.stab.indexstr) }
212 .comment 0 : { *(.comment) }
214 /* DWARF debug sections.
215 Symbols in the DWARF debugging sections are relative to the beginning
216 of the section so we begin them at 0. */
219 .debug 0 : { *(.debug) }
220 .line 0 : { *(.line) }
222 /* GNU DWARF 1 extensions */
223 .debug_srcinfo 0 : { *(.debug_srcinfo) }
224 .debug_sfnames 0 : { *(.debug_sfnames) }
226 /* DWARF 1.1 and DWARF 2 */
227 .debug_aranges 0 : { *(.debug_aranges) }
228 .debug_pubnames 0 : { *(.debug_pubnames) }
231 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
232 .debug_abbrev 0 : { *(.debug_abbrev) }
233 .debug_line 0 : { *(.debug_line) }
234 .debug_frame 0 : { *(.debug_frame) }
235 .debug_str 0 : { *(.debug_str) }
236 .debug_loc 0 : { *(.debug_loc) }
237 .debug_macinfo 0 : { *(.debug_macinfo) }
239 PROVIDE (__stack = ${STACK}) ;
240 PROVIDE (__data_start_rom = _etext) ;
241 PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
242 PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
243 PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
244 PROVIDE (__subdevice_has_heap = ${GOT_HEAP_MSP-0}) ;