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))
16 KEEP (*crtbegin?.o(.ctors))
18 /* We don't want to include the .ctor section from
19 the crtend.o file until after the sorted ctors.
20 The .ctor section from the crtend file contains the
21 end of ctors marker and it must be last */
23 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .ctors))
24 KEEP (*(SORT(.ctors.*)))
26 ${CONSTRUCTING+ __CTOR_END__ = .; }
27 } ${RELOCATING+ > ${DATA_MEMORY}}"
29 DTOR=" .dtors ${CONSTRUCTING-0} :
31 ${CONSTRUCTING+ __DTOR_LIST__ = .; }
32 KEEP (*crtbegin.o(.dtors))
33 KEEP (*crtbegin?.o(.dtors))
34 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .dtors))
35 KEEP (*(SORT(.dtors.*)))
37 ${CONSTRUCTING+ __DTOR_END__ = .; }
38 } ${RELOCATING+ > ${DATA_MEMORY}}"
41 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
46 text ${TEXT_DEF_SECTION} : ORIGIN = ${TEXT_START_ADDR}, LENGTH = ${TEXT_SIZE}
47 data ${DATA_DEF_SECTION} : ORIGIN = ${DATA_START_ADDR}, LENGTH = ${DATA_SIZE}
48 emem ${EMEM_DEF_SECTION} : ORIGIN = ${EMEM_START_ADDR}, LENGTH = ${EMEM_SIZE}
49 eit : ORIGIN = ${EIT_START_ADDR}, LENGTH = ${EIT_SIZE}
54 /* Read-only sections, merged into text segment: */
55 ${TEXT_DYNAMIC+${DYNAMIC}}
56 .hash ${RELOCATING-0} : { *(.hash) }
57 .dynsym ${RELOCATING-0} : { *(.dynsym) }
58 .dynstr ${RELOCATING-0} : { *(.dynstr) }
59 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
60 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
61 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
63 .rel.text ${RELOCATING-0} : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
64 .rela.text ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
65 .rel.data ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
66 .rela.data ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
67 .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
68 .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
69 .rel.stext ${RELOCATING-0} : { *(.rel.stest) }
70 .rela.stext ${RELOCATING-0} : { *(.rela.stest) }
71 .rel.etext ${RELOCATING-0} : { *(.rel.etest) }
72 .rela.etext ${RELOCATING-0} : { *(.rela.etest) }
73 .rel.sdata ${RELOCATING-0} : { *(.rel.sdata) }
74 .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) }
75 .rel.edata ${RELOCATING-0} : { *(.rel.edata) }
76 .rela.edata ${RELOCATING-0} : { *(.rela.edata) }
77 .rel.eit_v ${RELOCATING-0} : { *(.rel.eit_v) }
78 .rela.eit_v ${RELOCATING-0} : { *(.rela.eit_v) }
79 .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) }
80 .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
81 .rel.ebss ${RELOCATING-0} : { *(.rel.ebss) }
82 .rela.ebss ${RELOCATING-0} : { *(.rela.ebss) }
83 .rel.srodata ${RELOCATING-0} : { *(.rel.srodata) }
84 .rela.srodata ${RELOCATING-0} : { *(.rela.srodata) }
85 .rel.erodata ${RELOCATING-0} : { *(.rel.erodata) }
86 .rela.erodata ${RELOCATING-0} : { *(.rela.erodata) }
87 .rel.got ${RELOCATING-0} : { *(.rel.got) }
88 .rela.got ${RELOCATING-0} : { *(.rela.got) }
89 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
90 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
91 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
92 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
93 .rel.init ${RELOCATING-0} : { *(.rel.init) }
94 .rela.init ${RELOCATING-0} : { *(.rela.init) }
95 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
96 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
97 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
98 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
99 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
100 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
102 .init ${RELOCATING-0} : { *(.init) } =${NOP-0}
105 /* Internal text space */
106 .stext ${RELOCATING-0} : { *(.stext) } ${RELOCATING+ > text}
108 /* Internal text space or external memory */
115 ${RELOCATING+ _etext = . ; }
116 } ${RELOCATING+ > ${TEXT_MEMORY}}
118 /* Internal data space */
119 .srodata ${RELOCATING-0} : { *(.srodata) } ${RELOCATING+ > data}
120 .sdata ${RELOCATING-0} : { *(.sdata) } ${RELOCATING+ > data}
122 /* Internal data space or external memory */
123 .rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}}
125 /* C++ exception support. */
126 .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${DATA_MEMORY}}
127 .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) } ${RELOCATING+ > ${DATA_MEMORY}}
129 /* Java class registration support. */
130 .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) } ${RELOCATING+ >${DATA_MEMORY}}
132 ${RELOCATING+${CTOR}}
133 ${RELOCATING+${DTOR}}
135 .data ${RELOCATING-0} :
139 ${CONSTRUCTING+CONSTRUCTORS}
140 ${RELOCATING+ _edata = . ; }
141 } ${RELOCATING+ > ${DATA_MEMORY}}
143 /* External memory */
144 .etext ${RELOCATING-0} :
146 ${RELOCATING+ PROVIDE (__etext_start = .) ; }
148 ${RELOCATING+ PROVIDE (__etext_end = .) ; }
149 } ${RELOCATING+ > emem}
151 .erodata ${RELOCATING-0} : { *(.erodata) } ${RELOCATING+ > emem}
152 .edata ${RELOCATING-0} : { *(.edata) } ${RELOCATING+ > emem}
154 .sbss ${RELOCATING-0} :
156 ${RELOCATING+ PROVIDE (__sbss_start = .) ; }
158 ${RELOCATING+ PROVIDE (__sbss_end = .) ; }
159 } ${RELOCATING+ > data}
161 .ebss ${RELOCATING-0} :
163 ${RELOCATING+ PROVIDE (__ebss_start = .) ; }
165 ${RELOCATING+ PROVIDE (__ebss_end = .) ; }
166 } ${RELOCATING+ > data}
168 .bss ${RELOCATING-0} :
170 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
173 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
174 ${RELOCATING+ _end = . ; }
175 } ${RELOCATING+ > ${DATA_MEMORY}}
177 .eit_v ${RELOCATING-0} :
179 ${RELOCATING+ PROVIDE (__eit_start = .) ; }
181 ${RELOCATING+ PROVIDE (__eit_end = .) ; }
182 } ${RELOCATING+ > eit}
184 /* Stabs debugging sections. */
185 .stab 0 : { *(.stab) }
186 .stabstr 0 : { *(.stabstr) }
187 .stab.excl 0 : { *(.stab.excl) }
188 .stab.exclstr 0 : { *(.stab.exclstr) }
189 .stab.index 0 : { *(.stab.index) }
190 .stab.indexstr 0 : { *(.stab.indexstr) }
192 .comment 0 : { *(.comment) }
196 . $srcdir/scripttempl/DWARF.sc
199 PROVIDE (__stack = ${STACK_START_ADDR});