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