2 CTOR=".ctors ${CONSTRUCTING-0} :
4 ${CONSTRUCTING+ __CTOR_LIST__ = .; }
5 /* gcc uses crtbegin.o to find the start of
6 the constructors, so we make sure it is
7 first. Because this is a wildcard, it
8 doesn't matter if the user does not
9 actually link against crtbegin.o; the
10 linker won't look for a file to match a
11 wildcard. The wildcard also means that it
12 doesn't matter which directory crtbegin.o
15 KEEP (*crtbegin.o(.ctors))
17 /* We don't want to include the .ctor section from
18 from the crtend.o file until after the sorted ctors.
19 The .ctor section from the crtend file contains the
20 end of ctors marker and it must be last */
22 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
23 KEEP (*(SORT(.ctors.*)))
25 ${CONSTRUCTING+ __CTOR_END__ = .; }
26 } ${RELOCATING+ > ${DATA_MEMORY}}"
28 DTOR=" .dtors ${CONSTRUCTING-0} :
30 ${CONSTRUCTING+ __DTOR_LIST__ = .; }
31 KEEP (*crtbegin.o(.dtors))
32 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
33 KEEP (*(SORT(.dtors.*)))
35 ${CONSTRUCTING+ __DTOR_END__ = .; }
36 } ${RELOCATING+ > ${DATA_MEMORY}}"
39 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
44 text ${TEXT_DEF_SECTION} : ORIGIN = ${TEXT_START_ADDR}, LENGTH = ${TEXT_SIZE}
45 data ${DATA_DEF_SECTION} : ORIGIN = ${DATA_START_ADDR}, LENGTH = ${DATA_SIZE}
46 emem ${EMEM_DEF_SECTION} : ORIGIN = ${EMEM_START_ADDR}, LENGTH = ${EMEM_SIZE}
47 eit : ORIGIN = ${EIT_START_ADDR}, LENGTH = ${EIT_SIZE}
52 /* Read-only sections, merged into text segment: */
53 ${TEXT_DYNAMIC+${DYNAMIC}}
54 .hash ${RELOCATING-0} : { *(.hash) }
55 .dynsym ${RELOCATING-0} : { *(.dynsym) }
56 .dynstr ${RELOCATING-0} : { *(.dynstr) }
57 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
58 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
59 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
61 .rela.text ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
62 .rela.data ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
63 .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
64 .rela.stext ${RELOCATING-0} : { *(.rela.stest) }
65 .rela.etext ${RELOCATING-0} : { *(.rela.etest) }
66 .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) }
67 .rela.edata ${RELOCATING-0} : { *(.rela.edata) }
68 .rela.eit_v ${RELOCATING-0} : { *(.rela.eit_v) }
69 .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
70 .rela.ebss ${RELOCATING-0} : { *(.rela.ebss) }
71 .rela.srodata ${RELOCATING-0} : { *(.rela.srodata) }
72 .rela.erodata ${RELOCATING-0} : { *(.rela.erodata) }
73 .rela.got ${RELOCATING-0} : { *(.rela.got) }
74 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
75 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
76 .rela.init ${RELOCATING-0} : { *(.rela.init) }
77 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
78 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
79 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
81 .rel.data ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
82 .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
83 .rel.stext ${RELOCATING-0} : { *(.rel.stest) }
84 .rel.etext ${RELOCATING-0} : { *(.rel.etest) }
85 .rel.sdata ${RELOCATING-0} : { *(.rel.sdata) }
86 .rel.edata ${RELOCATING-0} : { *(.rel.edata) }
87 .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) }
88 .rel.ebss ${RELOCATING-0} : { *(.rel.ebss) }
89 .rel.eit_v ${RELOCATING-0} : { *(.rel.eit_v) }
90 .rel.srodata ${RELOCATING-0} : { *(.rel.srodata) }
91 .rel.erodata ${RELOCATING-0} : { *(.rel.erodata) }
92 .rel.got ${RELOCATING-0} : { *(.rel.got) }
93 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
94 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
95 .rel.init ${RELOCATING-0} : { *(.rel.init) }
96 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
97 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
98 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
100 .init ${RELOCATING-0} : { *(.init) } =${NOP-0}
103 /* Internal text space */
104 .stext ${RELOCATING-0} : { *(.stext) } ${RELOCATING+ > text}
106 /* Internal text space or external memory */
113 ${RELOCATING+ _etext = . ; }
114 } ${RELOCATING+ > ${TEXT_MEMORY}}
116 /* Internal data space */
117 .srodata ${RELOCATING-0} : { *(.srodata) } ${RELOCATING+ > data}
118 .sdata ${RELOCATING-0} : { *(.sdata) } ${RELOCATING+ > data}
120 /* Internal data space or external memory */
121 .rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}}
123 /* C++ exception support. */
124 .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${DATA_MEMORY}}
125 .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) } ${RELOCATING+ > ${DATA_MEMORY}}
127 ${RELOCATING+${CTOR}}
128 ${RELOCATING+${DTOR}}
130 .data ${RELOCATING-0} :
134 ${CONSTRUCTING+CONSTRUCTORS}
135 ${RELOCATING+ _edata = . ; }
136 } ${RELOCATING+ > ${DATA_MEMORY}}
138 /* External memory */
139 .etext ${RELOCATING-0} :
141 ${RELOCATING+ PROVIDE (__etext_start = .) ; }
143 ${RELOCATING+ PROVIDE (__etext_end = .) ; }
144 } ${RELOCATING+ > emem}
146 .erodata ${RELOCATING-0} : { *(.erodata) } ${RELOCATING+ > emem}
147 .edata ${RELOCATING-0} : { *(.edata) } ${RELOCATING+ > emem}
149 .sbss ${RELOCATING-0} :
151 ${RELOCATING+ PROVIDE (__sbss_start = .) ; }
153 ${RELOCATING+ PROVIDE (__sbss_end = .) ; }
154 } ${RELOCATING+ > data}
156 .ebss ${RELOCATING-0} :
158 ${RELOCATING+ PROVIDE (__ebss_start = .) ; }
160 ${RELOCATING+ PROVIDE (__ebss_end = .) ; }
161 } ${RELOCATING+ > data}
163 .bss ${RELOCATING-0} :
165 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
168 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
169 ${RELOCATING+ _end = . ; }
170 } ${RELOCATING+ > ${DATA_MEMORY}}
172 .eit_v ${RELOCATING-0} :
174 ${RELOCATING+ PROVIDE (__eit_start = .) ; }
176 ${RELOCATING+ PROVIDE (__eit_end = .) ; }
177 } ${RELOCATING+ > eit}
179 /* Stabs debugging sections. */
180 .stab 0 : { *(.stab) }
181 .stabstr 0 : { *(.stabstr) }
182 .stab.excl 0 : { *(.stab.excl) }
183 .stab.exclstr 0 : { *(.stab.exclstr) }
184 .stab.index 0 : { *(.stab.index) }
185 .stab.indexstr 0 : { *(.stab.indexstr) }
187 .comment 0 : { *(.comment) }
189 /* DWARF debug sections.
190 Symbols in the DWARF debugging sections are relative to the beginning
191 of the section so we begin them at 0. */
194 .debug 0 : { *(.debug) }
195 .line 0 : { *(.line) }
197 /* GNU DWARF 1 extensions */
198 .debug_srcinfo 0 : { *(.debug_srcinfo) }
199 .debug_sfnames 0 : { *(.debug_sfnames) }
201 /* DWARF 1.1 and DWARF 2 */
202 .debug_aranges 0 : { *(.debug_aranges) }
203 .debug_pubnames 0 : { *(.debug_pubnames) }
206 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
207 .debug_abbrev 0 : { *(.debug_abbrev) }
208 .debug_line 0 : { *(.debug_line) }
209 .debug_frame 0 : { *(.debug_frame) }
210 .debug_str 0 : { *(.debug_str) }
211 .debug_loc 0 : { *(.debug_loc) }
212 .debug_macinfo 0 : { *(.debug_macinfo) }
214 PROVIDE (__stack = ${STACK_START_ADDR});