]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/scripttempl/armbpabi.sc
* testsuite/retain_symbols_file_test.sh: Don't test for __tcf_0.
[thirdparty/binutils-gdb.git] / ld / scripttempl / armbpabi.sc
CommitLineData
229fcec5
MM
1# This variant of elf.sc is used for ARM BPABI platforms, like Symbian
2# OS, where a separate postlinker will operated on the generated
ba916c8a
MM
3# executable or shared object. See elf.sc for configuration variables
4# that apply; only BPABI-specific variables will be noted here.
229fcec5
MM
5
6test -z "$ENTRY" && ENTRY=_start
7test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
8test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
9if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
10test -z "${ELFSIZE}" && ELFSIZE=32
11test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
12test "$LD_FLAG" = "N" && DATA_ADDR=.
13test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
14test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
15test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
16DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
17DATA_SEGMENT_RELRO_END=""
18DATA_SEGMENT_RELRO_GOTPLT_END=""
19DATA_SEGMENT_END=""
20if test -n "${COMMONPAGESIZE}"; then
21 DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
22 DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
23 if test -n "${SEPARATE_GOTPLT}"; then
24 DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (. + ${SEPARATE_GOTPLT});"
25 else
26 DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (.);"
27 fi
28fi
29INTERP=".interp 0 : { *(.interp) }"
df381c72
AM
30PLT=".plt : { *(.plt) }"
31RODATA=".rodata : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
229fcec5 32DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
43e56c34 33DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
229fcec5 34if test -z "${NO_SMALL_DATA}"; then
df381c72 35 SBSS=".sbss :
229fcec5
MM
36 {
37 ${RELOCATING+PROVIDE (__sbss_start = .);}
38 ${RELOCATING+PROVIDE (___sbss_start = .);}
39 *(.dynsbss)
40 *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
41 *(.scommon)
42 ${RELOCATING+PROVIDE (__sbss_end = .);}
43 ${RELOCATING+PROVIDE (___sbss_end = .);}
44 }"
df381c72 45 SBSS2=".sbss2 : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
229fcec5
MM
46 SDATA="/* We want the small data sections together, so single-instruction offsets
47 can access them all, and initialized data all before uninitialized, so
48 we can shorten the on-disk segment size. */
df381c72 49 .sdata :
229fcec5
MM
50 {
51 ${RELOCATING+${SDATA_START_SYMBOLS}}
52 *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
53 }"
df381c72
AM
54 SDATA2=".sdata2 : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
55 REL_SDATA=".rel.sdata : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
56 .rela.sdata : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
57 REL_SBSS=".rel.sbss : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
58 .rela.sbss : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
59 REL_SDATA2=".rel.sdata2 : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
60 .rela.sdata2 : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
61 REL_SBSS2=".rel.sbss2 : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
62 .rela.sbss2 : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
229fcec5
MM
63else
64 NO_SMALL_DATA=" "
65fi
66test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
df381c72 67CTOR=".ctors :
229fcec5
MM
68 {
69 ${CONSTRUCTING+${CTOR_START}}
70 /* gcc uses crtbegin.o to find the start of
71 the constructors, so we make sure it is
72 first. Because this is a wildcard, it
73 doesn't matter if the user does not
74 actually link against crtbegin.o; the
75 linker won't look for a file to match a
76 wildcard. The wildcard also means that it
77 doesn't matter which directory crtbegin.o
78 is in. */
79
40cf2291
AM
80 KEEP (*crtbegin.o(.ctors))
81 KEEP (*crtbegin?.o(.ctors))
229fcec5
MM
82
83 /* We don't want to include the .ctor section from
bd6791bc 84 the crtend.o file until after the sorted ctors.
229fcec5
MM
85 The .ctor section from the crtend file contains the
86 end of ctors marker and it must be last */
87
40cf2291 88 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
229fcec5
MM
89 KEEP (*(SORT(.ctors.*)))
90 KEEP (*(.ctors))
91 ${CONSTRUCTING+${CTOR_END}}
92 }"
df381c72 93DTOR=".dtors :
229fcec5
MM
94 {
95 ${CONSTRUCTING+${DTOR_START}}
40cf2291
AM
96 KEEP (*crtbegin.o(.dtors))
97 KEEP (*crtbegin?.o(.dtors))
98 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
229fcec5
MM
99 KEEP (*(SORT(.dtors.*)))
100 KEEP (*(.dtors))
101 ${CONSTRUCTING+${DTOR_END}}
102 }"
df381c72 103STACK=" .stack ${RELOCATING+${STACK_ADDR}} :
229fcec5
MM
104 {
105 ${RELOCATING+_stack = .;}
106 *(.stack)
107 }"
108
ba916c8a
MM
109TEXT_START_ADDR="SEGMENT_START(\"text\", ${TEXT_START_ADDR})"
110SHLIB_TEXT_START_ADDR="SEGMENT_START(\"text\", ${SHLIB_TEXT_START_ADDR:-0})"
111DATA_ADDR="SEGMENT_START(\"data\", ${DATA_ADDR-${DATA_SEGMENT_ALIGN}})"
112SHLIB_DATA_ADDR="SEGMENT_START(\"data\", ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}})"
113
229fcec5
MM
114# if this is for an embedded system, don't add SIZEOF_HEADERS.
115if [ -z "$EMBEDDED" ]; then
116 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
ba916c8a 117 SHLIB_BASE_ADDRESS="${SHLIB_TEXT_START_ADDR} + SIZEOF_HEADERS"
229fcec5
MM
118else
119 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
ba916c8a 120 SHLIB_BASE_ADDRESS="${SHLIB_TEXT_START_ADDR}"
229fcec5
MM
121fi
122
123cat <<EOF
124OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
125 "${LITTLE_OUTPUT_FORMAT}")
126OUTPUT_ARCH(${OUTPUT_ARCH})
b34c1498 127${RELOCATING+ENTRY(${ENTRY})}
229fcec5
MM
128
129${RELOCATING+${LIB_SEARCH_DIRS}}
130${RELOCATING+/* Do we need any of these for elf?
131 __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
132${RELOCATING+${EXECUTABLE_SYMBOLS}}
133${RELOCATING+${INPUT_FILES}}
229fcec5 134
4e5db43b
MM
135/* ARM's proprietary toolchain generate these symbols to match the start
136 and end of particular sections of the image. SymbianOS uses these
137 symbols. We provide them for compatibility with ARM's toolchains.
138 These symbols should be bound locally; each shared object may define
139 its own version of these symbols. */
140
141VERSION
142{
c68dac40
PB
143 /* Give these a dummy version to work around linker lameness.
144 The name used shouldn't matter as these are all local symbols. */
145 __GNU {
4e5db43b
MM
146 local:
147 Image\$\$ER_RO\$\$Base;
148 Image\$\$ER_RO\$\$Limit;
149 SHT\$\$INIT_ARRAY\$\$Base;
150 SHT\$\$INIT_ARRAY\$\$Limit;
151 .ARM.exidx\$\$Base;
152 .ARM.exidx\$\$Limit;
153 };
154}
155
229fcec5
MM
156SECTIONS
157{
158 /* Read-only sections, merged into text segment: */
dc4c9c19 159 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR});}}}
4e5db43b 160
dc4c9c19 161 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+ . = ${TEXT_BASE_ADDRESS};}}}
ba916c8a
MM
162 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}}
163 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}}
4e5db43b
MM
164
165 /* Define Image\$\$ER_RO\$\$Base. */
166 ${RELOCATING+PROVIDE (Image\$\$ER_RO\$\$Base = .);}
167
229fcec5 168 ${INITIAL_READONLY_SECTIONS}
229fcec5
MM
169
170EOF
229fcec5 171cat <<EOF
df381c72 172 .init :
229fcec5
MM
173 {
174 ${RELOCATING+${INIT_START}}
175 KEEP (*(.init))
176 ${RELOCATING+${INIT_END}}
177 } =${NOP-0}
df381c72 178 .text :
229fcec5
MM
179 {
180 ${RELOCATING+${TEXT_START_SYMBOLS}}
181 *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
229fcec5
MM
182 /* .gnu.warning sections are handled specially by elf32.em. */
183 *(.gnu.warning)
184 ${RELOCATING+${OTHER_TEXT_SECTIONS}}
185 } =${NOP-0}
df381c72 186 .fini :
229fcec5
MM
187 {
188 ${RELOCATING+${FINI_START}}
189 KEEP (*(.fini))
190 ${RELOCATING+${FINI_END}}
191 } =${NOP-0}
dc4c9c19
MM
192 /* The SymbianOS kernel requires that the PLT go at the end of the
193 text section. */
194 ${DATA_PLT-${BSS_PLT-${PLT}}}
229fcec5
MM
195 ${RELOCATING+PROVIDE (__etext = .);}
196 ${RELOCATING+PROVIDE (_etext = .);}
197 ${RELOCATING+PROVIDE (etext = .);}
4e5db43b
MM
198
199 /* Define Image\$\$ER_RO\$\$Limit. */
dc4c9c19 200 ${RELOCATING+PROVIDE (Image\$\$ER_RO\$\$Limit = .);}
4e5db43b 201
229fcec5 202 ${WRITABLE_RODATA-${RODATA}}
df381c72 203 .rodata1 : { *(.rodata1) }
229fcec5
MM
204 ${CREATE_SHLIB-${SDATA2}}
205 ${CREATE_SHLIB-${SBSS2}}
229fcec5 206
dc4c9c19
MM
207 /* On SymbianOS, put .init_array and friends in the read-only
208 segment; there is no runtime relocation applied to these
209 arrays. */
229fcec5 210
df381c72 211 .preinit_array :
6f2942ed
PB
212 {
213 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}}
214 KEEP (*(.preinit_array))
215 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}}
216 }
df381c72 217 .init_array :
6f2942ed
PB
218 {
219 /* SymbianOS uses this symbol. */
220 ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Base = .);}
221 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_start = .);}}
222 KEEP (*(SORT(.init_array.*)))
223 KEEP (*(.init_array))
224 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_end = .);}}
225 /* SymbianOS uses this symbol. */
226 ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Limit = .);}
227 }
df381c72 228 .fini_array :
6f2942ed
PB
229 {
230 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}}
231 KEEP (*(.fini_array))
232 KEEP (*(SORT(.fini_array.*)))
233 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
234 }
229fcec5 235
dc4c9c19
MM
236 ${OTHER_READONLY_SECTIONS}
237 .eh_frame_hdr : { *(.eh_frame_hdr) }
df381c72
AM
238 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
239 .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
dc4c9c19
MM
240
241 /* Adjust the address for the data segment. We want to adjust up to
242 the same address within the page on the next page up. */
243 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR};}}}
244 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR};}}
245 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR};}}
246
247 /* Exception handling */
df381c72
AM
248 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
249 .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
dc4c9c19
MM
250
251 /* Thread Local Storage sections */
df381c72
AM
252 .tdata : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
253 .tbss : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
dc4c9c19 254
229fcec5
MM
255 ${RELOCATING+${CTOR}}
256 ${RELOCATING+${DTOR}}
df381c72 257 .jcr : { KEEP (*(.jcr)) }
229fcec5
MM
258
259 ${RELOCATING+${DATARELRO}}
260 ${OTHER_RELRO_SECTIONS}
261 ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
262
263 ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
264
df381c72 265 .data :
229fcec5
MM
266 {
267 ${RELOCATING+${DATA_START_SYMBOLS}}
268 *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
229fcec5
MM
269 ${CONSTRUCTING+SORT(CONSTRUCTORS)}
270 }
df381c72 271 .data1 : { *(.data1) }
229fcec5
MM
272 ${WRITABLE_RODATA+${RODATA}}
273 ${OTHER_READWRITE_SECTIONS}
274 ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
275 ${CREATE_SHLIB+${SDATA2}}
276 ${CREATE_SHLIB+${SBSS2}}
277 ${SDATA}
278 ${OTHER_SDATA_SECTIONS}
279 ${RELOCATING+_edata = .;}
280 ${RELOCATING+PROVIDE (edata = .);}
ba916c8a 281 ${RELOCATING+. = DEFINED(__bss_segment_start) ? __bss_segment_start : .;}
229fcec5
MM
282 ${RELOCATING+__bss_start = .;}
283 ${RELOCATING+${OTHER_BSS_SYMBOLS}}
284 ${SBSS}
285 ${BSS_PLT+${PLT}}
df381c72 286 .bss :
229fcec5
MM
287 {
288 *(.dynbss)
289 *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
290 *(COMMON)
291 /* Align here to ensure that the .bss section occupies space up to
292 _end. Align after .bss to ensure correct alignment even if the
293 .bss section disappears because there are no input sections. */
294 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
295 }
827a1c67 296 ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
229fcec5 297 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
9f4fb502 298 ${RELOCATING+${OTHER_END_SYMBOLS}}
827a1c67 299 ${RELOCATING+_end = .;}
229fcec5
MM
300 ${RELOCATING+PROVIDE (end = .);}
301 ${RELOCATING+${DATA_SEGMENT_END}}
302
303 /* These sections are not mapped under the BPABI. */
304 .dynamic 0 : { *(.dynamic) }
305 .hash 0 : { *(.hash) }
306 .dynsym 0 : { *(.dynsym) }
307 .dynstr 0 : { *(.dynstr) }
c0042f5d
MM
308 .gnu.version 0 : { *(.gnu.version) }
309 .gnu.version_d 0: { *(.gnu.version_d) }
310 .gnu.version_r 0: { *(.gnu.version_r) }
229fcec5
MM
311 ${CREATE_SHLIB-${INTERP}}
312
313 /* Stabs debugging sections. */
314 .stab 0 : { *(.stab) }
315 .stabstr 0 : { *(.stabstr) }
316 .stab.excl 0 : { *(.stab.excl) }
317 .stab.exclstr 0 : { *(.stab.exclstr) }
318 .stab.index 0 : { *(.stab.index) }
319 .stab.indexstr 0 : { *(.stab.indexstr) }
320
321 .comment 0 : { *(.comment) }
322
323 /* DWARF debug sections.
324 Symbols in the DWARF debugging sections are relative to the beginning
325 of the section so we begin them at 0. */
326
327 /* DWARF 1 */
328 .debug 0 : { *(.debug) }
329 .line 0 : { *(.line) }
330
331 /* GNU DWARF 1 extensions */
332 .debug_srcinfo 0 : { *(.debug_srcinfo) }
333 .debug_sfnames 0 : { *(.debug_sfnames) }
334
335 /* DWARF 1.1 and DWARF 2 */
336 .debug_aranges 0 : { *(.debug_aranges) }
337 .debug_pubnames 0 : { *(.debug_pubnames) }
338
339 /* DWARF 2 */
340 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
341 .debug_abbrev 0 : { *(.debug_abbrev) }
342 .debug_line 0 : { *(.debug_line) }
343 .debug_frame 0 : { *(.debug_frame) }
344 .debug_str 0 : { *(.debug_str) }
345 .debug_loc 0 : { *(.debug_loc) }
346 .debug_macinfo 0 : { *(.debug_macinfo) }
347
348 /* SGI/MIPS DWARF 2 extensions */
349 .debug_weaknames 0 : { *(.debug_weaknames) }
350 .debug_funcnames 0 : { *(.debug_funcnames) }
351 .debug_typenames 0 : { *(.debug_typenames) }
352 .debug_varnames 0 : { *(.debug_varnames) }
353
354 ${STACK_ADDR+${STACK}}
355 ${OTHER_SECTIONS}
827a1c67 356 ${RELOCATING+${OTHER_SYMBOLS}}
1c68693b 357 ${RELOCATING+${DISCARDED}}
ba916c8a
MM
358EOF
359
360# These relocations sections are part of the read-only segment in SVR4
361# executables, but are not mapped in BPABI executables.
362if [ "x$COMBRELOC" = x ]; then
363 COMBRELOCCAT=cat
364else
365 COMBRELOCCAT="cat > $COMBRELOC"
366fi
367eval $COMBRELOCCAT <<EOF
368 .rel.init 0 : { *(.rel.init) }
369 .rela.init 0 : { *(.rela.init) }
370 .rel.text 0 : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
371 .rela.text 0 : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
372 .rel.fini 0 : { *(.rel.fini) }
373 .rela.fini 0 : { *(.rela.fini) }
374 .rel.rodata 0 : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
375 .rela.rodata 0 : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
376 ${OTHER_READONLY_RELOC_SECTIONS}
377 .rel.data.rel.ro 0 : { *(.rel.data.rel.ro${RELOCATING+*}) }
378 .rela.data.rel.ro 0 : { *(.rel.data.rel.ro${RELOCATING+*}) }
379 .rel.data 0 : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
380 .rela.data 0 : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
381 .rel.tdata 0 : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
382 .rela.tdata 0 : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
383 .rel.tbss 0 : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
384 .rela.tbss 0 : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
385 .rel.ctors 0 : { *(.rel.ctors) }
386 .rela.ctors 0 : { *(.rela.ctors) }
387 .rel.dtors 0 : { *(.rel.dtors) }
388 .rela.dtors 0 : { *(.rela.dtors) }
389 ${REL_SDATA}
390 ${REL_SBSS}
391 ${REL_SDATA2}
392 ${REL_SBSS2}
393 .rel.bss 0 : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
394 .rela.bss 0 : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
2a2a7c94
JB
395 .rel.init_array 0 : { *(.rel.init_array) }
396 .rela.init_array 0 : { *(.rela.init_array) }
397 .rel.fini_array 0 : { *(.rel.fini_array) }
398 .rela.fini_array 0 : { *(.rela.fini_array) }
ba916c8a
MM
399EOF
400if [ -n "$COMBRELOC" ]; then
401cat <<EOF
402 .rel.dyn 0 :
403 {
404EOF
405sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
406cat <<EOF
407 }
408 .rela.dyn 0 :
409 {
410EOF
411sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
412cat <<EOF
413 }
414EOF
415fi
416cat <<EOF
417 .rel.plt 0 : { *(.rel.plt) }
418 .rela.plt 0 : { *(.rela.plt) }
419 ${OTHER_PLT_RELOC_SECTIONS}
2a2a7c94
JB
420 .rel.other 0 : { *(.rel.*) }
421 .rela.other 0 : { *(.rela.*) }
422 .reli.other 0 : { *(.reli.*) }
229fcec5
MM
423}
424EOF