]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/scripttempl/elfd30v.sc
* testsuite/retain_symbols_file_test.sh: Don't test for __tcf_0.
[thirdparty/binutils-gdb.git] / ld / scripttempl / elfd30v.sc
CommitLineData
252b5132 1
df381c72 2CTOR=".ctors :
252b5132
RH
3 {
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
13 is in. */
14
40cf2291
AM
15 KEEP (*crtbegin.o(.ctors))
16 KEEP (*crtbegin?.o(.ctors))
252b5132
RH
17
18 /* We don't want to include the .ctor section from
bd6791bc 19 the crtend.o file until after the sorted ctors.
252b5132
RH
20 The .ctor section from the crtend file contains the
21 end of ctors marker and it must be last */
22
40cf2291 23 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .ctors))
252b5132
RH
24 KEEP (*(SORT(.ctors.*)))
25 KEEP (*(.ctors))
26 ${CONSTRUCTING+ __CTOR_END__ = .; }
27 } ${RELOCATING+ > ${DATA_MEMORY}}"
28
df381c72 29DTOR=" .dtors :
252b5132
RH
30 {
31 ${CONSTRUCTING+ __DTOR_LIST__ = .; }
40cf2291
AM
32 KEEP (*crtbegin.o(.dtors))
33 KEEP (*crtbegin?.o(.dtors))
34 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o) .dtors))
252b5132
RH
35 KEEP (*(SORT(.dtors.*)))
36 KEEP (*(.dtors))
37 ${CONSTRUCTING+ __DTOR_END__ = .; }
38 } ${RELOCATING+ > ${DATA_MEMORY}}"
39
40cat <<EOF
41OUTPUT_FORMAT("${OUTPUT_FORMAT}")
42OUTPUT_ARCH(${ARCH})
43
44MEMORY
45{
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}
50}
51
52SECTIONS
53{
54 /* Read-only sections, merged into text segment: */
55 ${TEXT_DYNAMIC+${DYNAMIC}}
df381c72
AM
56 .hash : { *(.hash) }
57 .dynsym : { *(.dynsym) }
58 .dynstr : { *(.dynstr) }
59 .gnu.version : { *(.gnu.version) }
60 .gnu.version_d : { *(.gnu.version_d) }
61 .gnu.version_r : { *(.gnu.version_r) }
62
63 .rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
64 .rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
65 .rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
66 .rela.data : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
67 .rel.rodata : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
68 .rela.rodata : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
69 .rel.stext : { *(.rel.stest) }
70 .rela.stext : { *(.rela.stest) }
71 .rel.etext : { *(.rel.etest) }
72 .rela.etext : { *(.rela.etest) }
73 .rel.sdata : { *(.rel.sdata) }
74 .rela.sdata : { *(.rela.sdata) }
75 .rel.edata : { *(.rel.edata) }
76 .rela.edata : { *(.rela.edata) }
77 .rel.eit_v : { *(.rel.eit_v) }
78 .rela.eit_v : { *(.rela.eit_v) }
79 .rel.sbss : { *(.rel.sbss) }
80 .rela.sbss : { *(.rela.sbss) }
81 .rel.ebss : { *(.rel.ebss) }
82 .rela.ebss : { *(.rela.ebss) }
83 .rel.srodata : { *(.rel.srodata) }
84 .rela.srodata : { *(.rela.srodata) }
85 .rel.erodata : { *(.rel.erodata) }
86 .rela.erodata : { *(.rela.erodata) }
87 .rel.got : { *(.rel.got) }
88 .rela.got : { *(.rela.got) }
89 .rel.ctors : { *(.rel.ctors) }
90 .rela.ctors : { *(.rela.ctors) }
91 .rel.dtors : { *(.rel.dtors) }
92 .rela.dtors : { *(.rela.dtors) }
93 .rel.init : { *(.rel.init) }
94 .rela.init : { *(.rela.init) }
95 .rel.fini : { *(.rel.fini) }
96 .rela.fini : { *(.rela.fini) }
97 .rel.bss : { *(.rel.bss) }
98 .rela.bss : { *(.rela.bss) }
99 .rel.plt : { *(.rel.plt) }
100 .rela.plt : { *(.rela.plt) }
101
102 .init : { *(.init) } =${NOP-0}
252b5132
RH
103 ${DATA_PLT-${PLT}}
104
105 /* Internal text space */
df381c72 106 .stext : { *(.stext) } ${RELOCATING+ > text}
252b5132
RH
107
108 /* Internal text space or external memory */
109 .text :
110 {
111 *(.text)
112 *(.gnu.linkonce.t*)
113 *(.init)
114 *(.fini)
115 ${RELOCATING+ _etext = . ; }
116 } ${RELOCATING+ > ${TEXT_MEMORY}}
117
118 /* Internal data space */
df381c72
AM
119 .srodata : { *(.srodata) } ${RELOCATING+ > data}
120 .sdata : { *(.sdata) } ${RELOCATING+ > data}
252b5132
RH
121
122 /* Internal data space or external memory */
df381c72 123 .rodata : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}}
252b5132
RH
124
125 /* C++ exception support. */
df381c72
AM
126 .eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${DATA_MEMORY}}
127 .gcc_except_table : { *(.gcc_except_table) } ${RELOCATING+ > ${DATA_MEMORY}}
252b5132 128
24098abb 129 /* Java class registration support. */
df381c72 130 .jcr : { KEEP (*(.jcr)) } ${RELOCATING+ >${DATA_MEMORY}}
24098abb 131
252b5132
RH
132 ${RELOCATING+${CTOR}}
133 ${RELOCATING+${DTOR}}
134
df381c72 135 .data :
252b5132
RH
136 {
137 *(.data)
138 *(.gnu.linkonce.d*)
139 ${CONSTRUCTING+CONSTRUCTORS}
140 ${RELOCATING+ _edata = . ; }
141 } ${RELOCATING+ > ${DATA_MEMORY}}
142
143 /* External memory */
df381c72 144 .etext :
252b5132
RH
145 {
146 ${RELOCATING+ PROVIDE (__etext_start = .) ; }
147 *(.etext)
148 ${RELOCATING+ PROVIDE (__etext_end = .) ; }
149 } ${RELOCATING+ > emem}
150
df381c72
AM
151 .erodata : { *(.erodata) } ${RELOCATING+ > emem}
152 .edata : { *(.edata) } ${RELOCATING+ > emem}
252b5132 153
df381c72 154 .sbss :
252b5132
RH
155 {
156 ${RELOCATING+ PROVIDE (__sbss_start = .) ; }
157 *(.sbss)
158 ${RELOCATING+ PROVIDE (__sbss_end = .) ; }
159 } ${RELOCATING+ > data}
160
df381c72 161 .ebss :
252b5132
RH
162 {
163 ${RELOCATING+ PROVIDE (__ebss_start = .) ; }
164 *(.ebss)
165 ${RELOCATING+ PROVIDE (__ebss_end = .) ; }
166 } ${RELOCATING+ > data}
167
df381c72 168 .bss :
252b5132
RH
169 {
170 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
171 *(.bss)
172 *(COMMON)
173 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
174 ${RELOCATING+ _end = . ; }
175 } ${RELOCATING+ > ${DATA_MEMORY}}
176
df381c72 177 .eit_v :
252b5132
RH
178 {
179 ${RELOCATING+ PROVIDE (__eit_start = .) ; }
180 *(.eit_v)
181 ${RELOCATING+ PROVIDE (__eit_end = .) ; }
182 } ${RELOCATING+ > eit}
183
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) }
191
192 .comment 0 : { *(.comment) }
193
194 /* DWARF debug sections.
195 Symbols in the DWARF debugging sections are relative to the beginning
196 of the section so we begin them at 0. */
197
198 /* DWARF 1 */
199 .debug 0 : { *(.debug) }
200 .line 0 : { *(.line) }
201
202 /* GNU DWARF 1 extensions */
203 .debug_srcinfo 0 : { *(.debug_srcinfo) }
204 .debug_sfnames 0 : { *(.debug_sfnames) }
205
206 /* DWARF 1.1 and DWARF 2 */
207 .debug_aranges 0 : { *(.debug_aranges) }
208 .debug_pubnames 0 : { *(.debug_pubnames) }
209
210 /* DWARF 2 */
3a9d486c 211 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
252b5132
RH
212 .debug_abbrev 0 : { *(.debug_abbrev) }
213 .debug_line 0 : { *(.debug_line) }
214 .debug_frame 0 : { *(.debug_frame) }
215 .debug_str 0 : { *(.debug_str) }
216 .debug_loc 0 : { *(.debug_loc) }
217 .debug_macinfo 0 : { *(.debug_macinfo) }
218
219 PROVIDE (__stack = ${STACK_START_ADDR});
220}
221EOF
222
223
224
225