* tui/tui-file.c:
[deliverable/binutils-gdb.git] / ld / scripttempl / elfxtensa.sc
CommitLineData
e0001a05
NC
1#
2# Unusual variables checked by this code:
3# NOP - four byte opcode for no-op (defaults to 0)
4# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
5# empty.
be2c2e39
BW
6# SMALL_DATA_CTOR - .ctors contains small data.
7# SMALL_DATA_DTOR - .dtors contains small data.
e0001a05
NC
8# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
9# INITIAL_READONLY_SECTIONS - at start of text segment
10# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
11# (e.g., .PARISC.milli)
12# OTHER_TEXT_SECTIONS - these get put in .text when relocating
13# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
14# (e.g., .PARISC.global)
43cd72b9
BW
15# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
16# (e.g. PPC32 .fixup, .got[12])
e0001a05
NC
17# OTHER_SECTIONS - at the end
18# EXECUTABLE_SYMBOLS - symbols that must be defined for an
19# executable (e.g., _DYNAMIC_LINK)
be2c2e39
BW
20# TEXT_START_ADDR - the first byte of the text segment, after any
21# headers.
22# TEXT_BASE_ADDRESS - the first byte of the text segment.
e0001a05
NC
23# TEXT_START_SYMBOLS - symbols that appear at the start of the
24# .text section.
25# DATA_START_SYMBOLS - symbols that appear at the start of the
26# .data section.
be2c2e39
BW
27# DATA_END_SYMBOLS - symbols that appear at the end of the
28# writeable data sections.
e0001a05
NC
29# OTHER_GOT_SYMBOLS - symbols defined just before .got.
30# OTHER_GOT_SECTIONS - sections just after .got.
31# OTHER_SDATA_SECTIONS - sections just after .sdata.
32# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
33# .bss section besides __bss_start.
be2c2e39
BW
34# DATA_PLT - .plt should be in data segment, not text segment.
35# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
36# BSS_PLT - .plt should be in bss segment
e0001a05
NC
37# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
38# EMBEDDED - whether this is for an embedded system.
39# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
40# start address of shared library.
41# INPUT_FILES - INPUT command of files to always include
42# WRITABLE_RODATA - if set, the .rodata section should be writable
43# INIT_START, INIT_END - statements just before and just after
44# combination of .init sections.
45# FINI_START, FINI_END - statements just before and just after
46# combination of .fini sections.
47# STACK_ADDR - start of a .stack section.
827a1c67 48# OTHER_SYMBOLS - symbols to place right at the end of the script.
be2c2e39
BW
49# ETEXT_NAME - name of a symbol for the end of the text section,
50# normally etext.
51# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
52# so that .got can be in the RELRO area. It should be set to
53# the number of bytes in the beginning of .got.plt which can be
54# in the RELRO area as well.
e0001a05
NC
55#
56# When adding sections, do note that the names of some sections are used
57# when specifying the start address of the next.
58#
59
60# Many sections come in three flavours. There is the 'real' section,
61# like ".data". Then there are the per-procedure or per-variable
62# sections, generated by -ffunction-sections and -fdata-sections in GCC,
63# and useful for --gc-sections, which for a variable "foo" might be
64# ".data.foo". Then there are the linkonce sections, for which the linker
65# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
66# The exact correspondences are:
67#
68# Section Linkonce section
69# .text .gnu.linkonce.t.foo
70# .rodata .gnu.linkonce.r.foo
71# .data .gnu.linkonce.d.foo
72# .bss .gnu.linkonce.b.foo
73# .sdata .gnu.linkonce.s.foo
74# .sbss .gnu.linkonce.sb.foo
75# .sdata2 .gnu.linkonce.s2.foo
76# .sbss2 .gnu.linkonce.sb2.foo
77# .debug_info .gnu.linkonce.wi.foo
78# .tdata .gnu.linkonce.td.foo
79# .tbss .gnu.linkonce.tb.foo
80#
81# Each of these can also have corresponding .rel.* and .rela.* sections.
82
83test -z "$ENTRY" && ENTRY=_start
be2c2e39
BW
84test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
85test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
86if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
e0001a05
NC
87test -z "${ELFSIZE}" && ELFSIZE=32
88test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
89test "$LD_FLAG" = "N" && DATA_ADDR=.
be2c2e39 90test -z "${ETEXT_NAME}" && ETEXT_NAME=etext
43cd72b9
BW
91test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
92test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
be2c2e39 93test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
e0001a05 94DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
43cd72b9 95DATA_SEGMENT_RELRO_END=""
e0001a05
NC
96DATA_SEGMENT_END=""
97if test -n "${COMMONPAGESIZE}"; then
98 DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
99 DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
be2c2e39 100 DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
e0001a05
NC
101fi
102INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
be2c2e39
BW
103if test -z "$PLT"; then
104 PLT=".plt ${RELOCATING-0} : { *(.plt) }"
105fi
43cd72b9 106if test -z "$GOT"; then
be2c2e39
BW
107 if test -z "$SEPARATE_GOTPLT"; then
108 GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
109 else
43cd72b9 110 GOT=".got ${RELOCATING-0} : { *(.got) }"
be2c2e39
BW
111 GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }"
112 fi
43cd72b9 113fi
e0001a05
NC
114DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
115RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
43cd72b9
BW
116DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
117STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
e0001a05
NC
118INIT_LIT=".init.literal 0 : { *(.init.literal) }"
119INIT=".init 0 : { *(.init) }"
120FINI_LIT=".fini.literal 0 : { *(.fini.literal) }"
121FINI=".fini 0 : { *(.fini) }"
122if test -z "${NO_SMALL_DATA}"; then
123 SBSS=".sbss ${RELOCATING-0} :
124 {
be2c2e39 125 ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
e0001a05
NC
126 *(.dynsbss)
127 *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
128 *(.scommon)
e0001a05
NC
129 }"
130 SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
131 SDATA="/* We want the small data sections together, so single-instruction offsets
132 can access them all, and initialized data all before uninitialized, so
133 we can shorten the on-disk segment size. */
134 .sdata ${RELOCATING-0} :
135 {
136 ${RELOCATING+${SDATA_START_SYMBOLS}}
be2c2e39 137 ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
e0001a05
NC
138 *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
139 }"
140 SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
141 REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
142 .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
143 REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
144 .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
145 REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
146 .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
147 REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
148 .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
43cd72b9
BW
149else
150 NO_SMALL_DATA=" "
e0001a05 151fi
be2c2e39
BW
152if test -z "${DATA_GOT}"; then
153 if test -n "${NO_SMALL_DATA}"; then
154 DATA_GOT=" "
155 fi
156fi
157if test -z "${SDATA_GOT}"; then
158 if test -z "${NO_SMALL_DATA}"; then
159 SDATA_GOT=" "
160 fi
161fi
162test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
e0001a05
NC
163CTOR=".ctors ${CONSTRUCTING-0} :
164 {
165 ${CONSTRUCTING+${CTOR_START}}
166 /* gcc uses crtbegin.o to find the start of
167 the constructors, so we make sure it is
168 first. Because this is a wildcard, it
169 doesn't matter if the user does not
170 actually link against crtbegin.o; the
171 linker won't look for a file to match a
172 wildcard. The wildcard also means that it
173 doesn't matter which directory crtbegin.o
174 is in. */
175
877d60f7 176 KEEP (*crtbegin*.o(.ctors))
e0001a05
NC
177
178 /* We don't want to include the .ctor section from
bd6791bc 179 the crtend.o file until after the sorted ctors.
e0001a05
NC
180 The .ctor section from the crtend file contains the
181 end of ctors marker and it must be last */
182
877d60f7 183 KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
e0001a05
NC
184 KEEP (*(SORT(.ctors.*)))
185 KEEP (*(.ctors))
186 ${CONSTRUCTING+${CTOR_END}}
187 }"
188DTOR=".dtors ${CONSTRUCTING-0} :
189 {
190 ${CONSTRUCTING+${DTOR_START}}
877d60f7
AM
191 KEEP (*crtbegin*.o(.dtors))
192 KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
e0001a05
NC
193 KEEP (*(SORT(.dtors.*)))
194 KEEP (*(.dtors))
195 ${CONSTRUCTING+${DTOR_END}}
196 }"
197STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
198 {
199 ${RELOCATING+_stack = .;}
200 *(.stack)
201 }"
202
203# if this is for an embedded system, don't add SIZEOF_HEADERS.
204if [ -z "$EMBEDDED" ]; then
205 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
206else
207 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
208fi
209
210cat <<EOF
211ENTRY(${ENTRY})
212
213${RELOCATING+${LIB_SEARCH_DIRS}}
214${RELOCATING+/* Do we need any of these for elf?
215 __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
216${RELOCATING+${EXECUTABLE_SYMBOLS}}
217${RELOCATING+${INPUT_FILES}}
218${RELOCATING- /* For some reason, the Solaris linker makes bad executables
219 if gld -r is used and the intermediate file has sections starting
220 at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
221 bug. But for now assigning the zero vmas works. */}
222
223SECTIONS
224{
225 /* Read-only sections, merged into text segment: */
43cd72b9 226 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
e0001a05 227 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
43cd72b9 228 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
e0001a05
NC
229 ${CREATE_SHLIB-${INTERP}}
230 ${INITIAL_READONLY_SECTIONS}
231 ${TEXT_DYNAMIC+${DYNAMIC}}
232 .hash ${RELOCATING-0} : { *(.hash) }
233 .dynsym ${RELOCATING-0} : { *(.dynsym) }
234 .dynstr ${RELOCATING-0} : { *(.dynstr) }
235 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
236 .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
237 .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
238
239EOF
240if [ "x$COMBRELOC" = x ]; then
241 COMBRELOCCAT=cat
242else
243 COMBRELOCCAT="cat > $COMBRELOC"
244fi
245eval $COMBRELOCCAT <<EOF
246 .rel.init ${RELOCATING-0} : { *(.rel.init) }
247 .rela.init ${RELOCATING-0} : { *(.rela.init) }
248 .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
249 .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
250 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
251 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
252 .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
253 .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
254 ${OTHER_READONLY_RELOC_SECTIONS}
43cd72b9
BW
255 .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
256 .rela.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
e0001a05
NC
257 .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
258 .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
259 .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
260 .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
261 .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
262 .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
263 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
264 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
265 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
266 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
267 .rel.got ${RELOCATING-0} : { *(.rel.got) }
268 .rela.got ${RELOCATING-0} : { *(.rela.got) }
269 ${OTHER_GOT_RELOC_SECTIONS}
270 ${REL_SDATA}
271 ${REL_SBSS}
272 ${REL_SDATA2}
273 ${REL_SBSS2}
274 .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
275 .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
276EOF
277if [ -n "$COMBRELOC" ]; then
278cat <<EOF
279 .rel.dyn ${RELOCATING-0} :
280 {
281EOF
282sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
283cat <<EOF
284 }
285 .rela.dyn ${RELOCATING-0} :
286 {
287EOF
288sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
289cat <<EOF
290 }
291EOF
292fi
293cat <<EOF
294 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
295 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
296 ${OTHER_PLT_RELOC_SECTIONS}
297
298 ${RELOCATING-$INIT_LIT}
299 ${RELOCATING-$INIT}
300
be2c2e39 301 ${DATA_PLT-${BSS_PLT-${PLT}}}
e0001a05
NC
302 .text ${RELOCATING-0} :
303 {
304 *(.got.plt* .plt*)
305
306 ${RELOCATING+${INIT_START}}
307 ${RELOCATING+KEEP (*(.init.literal))}
308 ${RELOCATING+KEEP (*(.init))}
309 ${RELOCATING+${INIT_END}}
310
311 ${RELOCATING+${TEXT_START_SYMBOLS}}
43cd72b9
BW
312 *(.literal .text .stub${RELOCATING+ .text.* .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*})
313 KEEP (*(.text.*personality*))
e0001a05
NC
314 /* .gnu.warning sections are handled specially by elf32.em. */
315 *(.gnu.warning)
316 ${RELOCATING+${OTHER_TEXT_SECTIONS}}
317
318 ${RELOCATING+${FINI_START}}
319 ${RELOCATING+KEEP (*(.fini.literal))}
320 ${RELOCATING+KEEP (*(.fini))}
321 ${RELOCATING+${FINI_END}}
322 } =${NOP-0}
323
324 ${RELOCATING-$FINI_LIT}
325 ${RELOCATING-$FINI}
326
be2c2e39
BW
327 ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
328 ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
329 ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
e0001a05
NC
330 ${WRITABLE_RODATA-${RODATA}}
331 .rodata1 ${RELOCATING-0} : { *(.rodata1) }
332 ${CREATE_SHLIB-${SDATA2}}
333 ${CREATE_SHLIB-${SBSS2}}
334 ${OTHER_READONLY_SECTIONS}
335 .eh_frame_hdr : { *(.eh_frame_hdr) }
43cd72b9
BW
336 .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
337 .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
e0001a05
NC
338
339 /* Adjust the address for the data segment. We want to adjust up to
340 the same address within the page on the next page up. */
43cd72b9 341 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
e0001a05 342 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
43cd72b9
BW
343 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
344
345 /* Exception handling */
346 .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
347 .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
348
349 /* Thread Local Storage sections */
350 .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
351 .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
e0001a05 352
6f2942ed
PB
353 .preinit_array ${RELOCATING-0} :
354 {
355 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}}
356 KEEP (*(.preinit_array))
357 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}}
358 }
359 .init_array ${RELOCATING-0} :
360 {
361 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_start = .);}}
362 KEEP (*(SORT(.init_array.*)))
363 KEEP (*(.init_array))
364 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_end = .);}}
365 }
366 .fini_array ${RELOCATING-0} :
367 {
368 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}}
369 KEEP (*(.fini_array))
370 KEEP (*(SORT(.fini_array.*)))
371 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
372 }
e0001a05 373
be2c2e39
BW
374 ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
375 ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
43cd72b9
BW
376 .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
377
378 ${RELOCATING+${DATARELRO}}
379 ${OTHER_RELRO_SECTIONS}
380 ${TEXT_DYNAMIC-${DYNAMIC}}
be2c2e39
BW
381 ${DATA_GOT+${RELRO_NOW+${GOT}}}
382 ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
383 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
43cd72b9 384 ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
be2c2e39
BW
385 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
386 ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
387
388 ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
43cd72b9 389
e0001a05
NC
390 .data ${RELOCATING-0} :
391 {
392 ${RELOCATING+${DATA_START_SYMBOLS}}
393 *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
43cd72b9 394 KEEP (*(.gnu.linkonce.d.*personality*))
e0001a05
NC
395 ${CONSTRUCTING+SORT(CONSTRUCTORS)}
396 }
397 .data1 ${RELOCATING-0} : { *(.data1) }
e0001a05
NC
398 ${WRITABLE_RODATA+${RODATA}}
399 ${OTHER_READWRITE_SECTIONS}
be2c2e39
BW
400 ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
401 ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
402 ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
403 ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS}}}
404 ${SDATA_GOT+${GOT}}
405 ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
e0001a05
NC
406 ${SDATA}
407 ${OTHER_SDATA_SECTIONS}
be2c2e39 408 ${RELOCATING+${DATA_END_SYMBOLS-_edata = .; PROVIDE (edata = .);}}
e0001a05
NC
409 ${RELOCATING+__bss_start = .;}
410 ${RELOCATING+${OTHER_BSS_SYMBOLS}}
411 ${SBSS}
be2c2e39 412 ${BSS_PLT+${PLT}}
e0001a05
NC
413 .bss ${RELOCATING-0} :
414 {
415 *(.dynbss)
416 *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
417 *(COMMON)
418 /* Align here to ensure that the .bss section occupies space up to
419 _end. Align after .bss to ensure correct alignment even if the
420 .bss section disappears because there are no input sections. */
421 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
422 }
827a1c67 423 ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
e0001a05 424 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
9f4fb502 425 ${RELOCATING+${OTHER_END_SYMBOLS}}
827a1c67 426 ${RELOCATING+_end = .;}
e0001a05
NC
427 ${RELOCATING+PROVIDE (end = .);}
428 ${RELOCATING+${DATA_SEGMENT_END}}
429
430 /* Stabs debugging sections. */
431 .stab 0 : { *(.stab) }
432 .stabstr 0 : { *(.stabstr) }
433 .stab.excl 0 : { *(.stab.excl) }
434 .stab.exclstr 0 : { *(.stab.exclstr) }
435 .stab.index 0 : { *(.stab.index) }
436 .stab.indexstr 0 : { *(.stab.indexstr) }
437
438 .comment 0 : { *(.comment) }
439
440 /* DWARF debug sections.
441 Symbols in the DWARF debugging sections are relative to the beginning
442 of the section so we begin them at 0. */
443
444 /* DWARF 1 */
445 .debug 0 : { *(.debug) }
446 .line 0 : { *(.line) }
447
448 /* GNU DWARF 1 extensions */
449 .debug_srcinfo 0 : { *(.debug_srcinfo) }
450 .debug_sfnames 0 : { *(.debug_sfnames) }
451
452 /* DWARF 1.1 and DWARF 2 */
453 .debug_aranges 0 : { *(.debug_aranges) }
454 .debug_pubnames 0 : { *(.debug_pubnames) }
455
456 /* DWARF 2 */
457 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
458 .debug_abbrev 0 : { *(.debug_abbrev) }
459 .debug_line 0 : { *(.debug_line) }
460 .debug_frame 0 : { *(.debug_frame) }
461 .debug_str 0 : { *(.debug_str) }
462 .debug_loc 0 : { *(.debug_loc) }
463 .debug_macinfo 0 : { *(.debug_macinfo) }
464
465 /* SGI/MIPS DWARF 2 extensions */
466 .debug_weaknames 0 : { *(.debug_weaknames) }
467 .debug_funcnames 0 : { *(.debug_funcnames) }
468 .debug_typenames 0 : { *(.debug_typenames) }
469 .debug_varnames 0 : { *(.debug_varnames) }
470
471 ${STACK_ADDR+${STACK}}
472 ${OTHER_SECTIONS}
827a1c67 473 ${RELOCATING+${OTHER_SYMBOLS}}
43cd72b9 474 ${RELOCATING+${STACKNOTE}}
e0001a05
NC
475}
476EOF
This page took 0.170817 seconds and 4 git commands to generate.