gas/
[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
40cf2291
AM
176 KEEP (*crtbegin.o(.ctors))
177 KEEP (*crtbegin?.o(.ctors))
e0001a05
NC
178
179 /* We don't want to include the .ctor section from
bd6791bc 180 the crtend.o file until after the sorted ctors.
e0001a05
NC
181 The .ctor section from the crtend file contains the
182 end of ctors marker and it must be last */
183
40cf2291 184 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
e0001a05
NC
185 KEEP (*(SORT(.ctors.*)))
186 KEEP (*(.ctors))
187 ${CONSTRUCTING+${CTOR_END}}
188 }"
189DTOR=".dtors ${CONSTRUCTING-0} :
190 {
191 ${CONSTRUCTING+${DTOR_START}}
40cf2291
AM
192 KEEP (*crtbegin.o(.dtors))
193 KEEP (*crtbegin?.o(.dtors))
194 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
e0001a05
NC
195 KEEP (*(SORT(.dtors.*)))
196 KEEP (*(.dtors))
197 ${CONSTRUCTING+${DTOR_END}}
198 }"
199STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
200 {
201 ${RELOCATING+_stack = .;}
202 *(.stack)
203 }"
204
205# if this is for an embedded system, don't add SIZEOF_HEADERS.
206if [ -z "$EMBEDDED" ]; then
207 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
208else
209 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
210fi
211
212cat <<EOF
213ENTRY(${ENTRY})
214
215${RELOCATING+${LIB_SEARCH_DIRS}}
216${RELOCATING+/* Do we need any of these for elf?
217 __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
218${RELOCATING+${EXECUTABLE_SYMBOLS}}
219${RELOCATING+${INPUT_FILES}}
220${RELOCATING- /* For some reason, the Solaris linker makes bad executables
221 if gld -r is used and the intermediate file has sections starting
222 at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
223 bug. But for now assigning the zero vmas works. */}
224
225SECTIONS
226{
227 /* Read-only sections, merged into text segment: */
43cd72b9 228 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
e0001a05 229 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
43cd72b9 230 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
e0001a05
NC
231 ${CREATE_SHLIB-${INTERP}}
232 ${INITIAL_READONLY_SECTIONS}
233 ${TEXT_DYNAMIC+${DYNAMIC}}
234 .hash ${RELOCATING-0} : { *(.hash) }
235 .dynsym ${RELOCATING-0} : { *(.dynsym) }
236 .dynstr ${RELOCATING-0} : { *(.dynstr) }
237 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
238 .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
239 .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
240
241EOF
242if [ "x$COMBRELOC" = x ]; then
243 COMBRELOCCAT=cat
244else
245 COMBRELOCCAT="cat > $COMBRELOC"
246fi
247eval $COMBRELOCCAT <<EOF
248 .rel.init ${RELOCATING-0} : { *(.rel.init) }
249 .rela.init ${RELOCATING-0} : { *(.rela.init) }
250 .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
251 .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
252 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
253 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
254 .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
255 .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
256 ${OTHER_READONLY_RELOC_SECTIONS}
43cd72b9
BW
257 .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
258 .rela.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
e0001a05
NC
259 .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
260 .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
261 .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
262 .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
263 .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
264 .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
265 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
266 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
267 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
268 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
269 .rel.got ${RELOCATING-0} : { *(.rel.got) }
270 .rela.got ${RELOCATING-0} : { *(.rela.got) }
271 ${OTHER_GOT_RELOC_SECTIONS}
272 ${REL_SDATA}
273 ${REL_SBSS}
274 ${REL_SDATA2}
275 ${REL_SBSS2}
276 .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
277 .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
278EOF
279if [ -n "$COMBRELOC" ]; then
280cat <<EOF
281 .rel.dyn ${RELOCATING-0} :
282 {
283EOF
284sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
285cat <<EOF
286 }
287 .rela.dyn ${RELOCATING-0} :
288 {
289EOF
290sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
291cat <<EOF
292 }
293EOF
294fi
295cat <<EOF
296 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
297 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
298 ${OTHER_PLT_RELOC_SECTIONS}
299
300 ${RELOCATING-$INIT_LIT}
301 ${RELOCATING-$INIT}
302
be2c2e39 303 ${DATA_PLT-${BSS_PLT-${PLT}}}
e0001a05
NC
304 .text ${RELOCATING-0} :
305 {
306 *(.got.plt* .plt*)
307
308 ${RELOCATING+${INIT_START}}
309 ${RELOCATING+KEEP (*(.init.literal))}
310 ${RELOCATING+KEEP (*(.init))}
311 ${RELOCATING+${INIT_END}}
312
313 ${RELOCATING+${TEXT_START_SYMBOLS}}
74869ac7 314 *(.literal .text .stub${RELOCATING+ .literal.* .text.* .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*})
43cd72b9 315 KEEP (*(.text.*personality*))
e0001a05
NC
316 /* .gnu.warning sections are handled specially by elf32.em. */
317 *(.gnu.warning)
318 ${RELOCATING+${OTHER_TEXT_SECTIONS}}
319
320 ${RELOCATING+${FINI_START}}
321 ${RELOCATING+KEEP (*(.fini.literal))}
322 ${RELOCATING+KEEP (*(.fini))}
323 ${RELOCATING+${FINI_END}}
324 } =${NOP-0}
325
326 ${RELOCATING-$FINI_LIT}
327 ${RELOCATING-$FINI}
328
be2c2e39
BW
329 ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
330 ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
331 ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
e0001a05
NC
332 ${WRITABLE_RODATA-${RODATA}}
333 .rodata1 ${RELOCATING-0} : { *(.rodata1) }
334 ${CREATE_SHLIB-${SDATA2}}
335 ${CREATE_SHLIB-${SBSS2}}
336 ${OTHER_READONLY_SECTIONS}
337 .eh_frame_hdr : { *(.eh_frame_hdr) }
43cd72b9
BW
338 .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
339 .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
e0001a05
NC
340
341 /* Adjust the address for the data segment. We want to adjust up to
342 the same address within the page on the next page up. */
43cd72b9 343 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
e0001a05 344 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
43cd72b9
BW
345 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
346
347 /* Exception handling */
348 .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
349 .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
350
351 /* Thread Local Storage sections */
352 .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
353 .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
e0001a05 354
6f2942ed
PB
355 .preinit_array ${RELOCATING-0} :
356 {
357 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}}
358 KEEP (*(.preinit_array))
359 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}}
360 }
361 .init_array ${RELOCATING-0} :
362 {
363 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_start = .);}}
364 KEEP (*(SORT(.init_array.*)))
365 KEEP (*(.init_array))
366 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_end = .);}}
367 }
368 .fini_array ${RELOCATING-0} :
369 {
370 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}}
371 KEEP (*(.fini_array))
372 KEEP (*(SORT(.fini_array.*)))
373 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
374 }
e0001a05 375
be2c2e39
BW
376 ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
377 ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
43cd72b9
BW
378 .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
379
380 ${RELOCATING+${DATARELRO}}
381 ${OTHER_RELRO_SECTIONS}
382 ${TEXT_DYNAMIC-${DYNAMIC}}
be2c2e39
BW
383 ${DATA_GOT+${RELRO_NOW+${GOT}}}
384 ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
385 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
43cd72b9 386 ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
be2c2e39
BW
387 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
388 ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
389
390 ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
43cd72b9 391
e0001a05
NC
392 .data ${RELOCATING-0} :
393 {
394 ${RELOCATING+${DATA_START_SYMBOLS}}
395 *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
43cd72b9 396 KEEP (*(.gnu.linkonce.d.*personality*))
e0001a05
NC
397 ${CONSTRUCTING+SORT(CONSTRUCTORS)}
398 }
399 .data1 ${RELOCATING-0} : { *(.data1) }
e0001a05
NC
400 ${WRITABLE_RODATA+${RODATA}}
401 ${OTHER_READWRITE_SECTIONS}
be2c2e39
BW
402 ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
403 ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
404 ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
405 ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS}}}
406 ${SDATA_GOT+${GOT}}
407 ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
e0001a05
NC
408 ${SDATA}
409 ${OTHER_SDATA_SECTIONS}
be2c2e39 410 ${RELOCATING+${DATA_END_SYMBOLS-_edata = .; PROVIDE (edata = .);}}
e0001a05
NC
411 ${RELOCATING+__bss_start = .;}
412 ${RELOCATING+${OTHER_BSS_SYMBOLS}}
413 ${SBSS}
be2c2e39 414 ${BSS_PLT+${PLT}}
e0001a05
NC
415 .bss ${RELOCATING-0} :
416 {
417 *(.dynbss)
418 *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
419 *(COMMON)
420 /* Align here to ensure that the .bss section occupies space up to
421 _end. Align after .bss to ensure correct alignment even if the
422 .bss section disappears because there are no input sections. */
423 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
424 }
827a1c67 425 ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
e0001a05 426 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
9f4fb502 427 ${RELOCATING+${OTHER_END_SYMBOLS}}
827a1c67 428 ${RELOCATING+_end = .;}
e0001a05
NC
429 ${RELOCATING+PROVIDE (end = .);}
430 ${RELOCATING+${DATA_SEGMENT_END}}
431
432 /* Stabs debugging sections. */
433 .stab 0 : { *(.stab) }
434 .stabstr 0 : { *(.stabstr) }
435 .stab.excl 0 : { *(.stab.excl) }
436 .stab.exclstr 0 : { *(.stab.exclstr) }
437 .stab.index 0 : { *(.stab.index) }
438 .stab.indexstr 0 : { *(.stab.indexstr) }
439
440 .comment 0 : { *(.comment) }
441
442 /* DWARF debug sections.
443 Symbols in the DWARF debugging sections are relative to the beginning
444 of the section so we begin them at 0. */
445
446 /* DWARF 1 */
447 .debug 0 : { *(.debug) }
448 .line 0 : { *(.line) }
449
450 /* GNU DWARF 1 extensions */
451 .debug_srcinfo 0 : { *(.debug_srcinfo) }
452 .debug_sfnames 0 : { *(.debug_sfnames) }
453
454 /* DWARF 1.1 and DWARF 2 */
455 .debug_aranges 0 : { *(.debug_aranges) }
456 .debug_pubnames 0 : { *(.debug_pubnames) }
457
458 /* DWARF 2 */
459 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
460 .debug_abbrev 0 : { *(.debug_abbrev) }
461 .debug_line 0 : { *(.debug_line) }
462 .debug_frame 0 : { *(.debug_frame) }
463 .debug_str 0 : { *(.debug_str) }
464 .debug_loc 0 : { *(.debug_loc) }
465 .debug_macinfo 0 : { *(.debug_macinfo) }
466
467 /* SGI/MIPS DWARF 2 extensions */
468 .debug_weaknames 0 : { *(.debug_weaknames) }
469 .debug_funcnames 0 : { *(.debug_funcnames) }
470 .debug_typenames 0 : { *(.debug_typenames) }
471 .debug_varnames 0 : { *(.debug_varnames) }
472
473 ${STACK_ADDR+${STACK}}
474 ${OTHER_SECTIONS}
827a1c67 475 ${RELOCATING+${OTHER_SYMBOLS}}
43cd72b9 476 ${RELOCATING+${STACKNOTE}}
e0001a05
NC
477}
478EOF
This page took 0.175096 seconds and 4 git commands to generate.