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
6 # SMALL_DATA_CTOR - .ctors contains small data.
7 # SMALL_DATA_DTOR - .dtors contains small data.
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)
15 # OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
16 # (e.g. PPC32 .fixup, .got[12])
17 # OTHER_SECTIONS - at the end
18 # EXECUTABLE_SYMBOLS - symbols that must be defined for an
19 # executable (e.g., _DYNAMIC_LINK)
20 # TEXT_START_ADDR - the first byte of the text segment, after any
22 # TEXT_BASE_ADDRESS - the first byte of the text segment.
23 # TEXT_START_SYMBOLS - symbols that appear at the start of the
25 # DATA_START_SYMBOLS - symbols that appear at the start of the
27 # DATA_END_SYMBOLS - symbols that appear at the end of the
28 # writeable data sections.
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.
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
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.
48 # OTHER_SYMBOLS - symbols to place right at the end of the script.
49 # ETEXT_NAME - name of a symbol for the end of the text section,
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.
56 # When adding sections, do note that the names of some sections are used
57 # when specifying the start address of the next.
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:
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
81 # Each of these can also have corresponding .rel.* and .rela.* sections.
83 test -z "$ENTRY" && ENTRY=_start
84 test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
85 test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
86 if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
87 test -z "${ELFSIZE}" && ELFSIZE=32
88 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
89 test "$LD_FLAG" = "N" && DATA_ADDR=.
90 test -z "${ETEXT_NAME}" && ETEXT_NAME=etext
91 test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
92 test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
93 test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
94 DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
95 DATA_SEGMENT_RELRO_END=""
97 if 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 (.);"
100 DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
102 INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
103 if test -z "$PLT"; then
104 PLT=".plt ${RELOCATING-0} : { *(.plt) }"
106 if test -z "$GOT"; then
107 if test -z "$SEPARATE_GOTPLT"; then
108 GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
110 GOT=".got ${RELOCATING-0} : { *(.got) }"
111 GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }"
114 DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
115 RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
116 DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
117 STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
118 INIT_LIT=".init.literal 0 : { *(.init.literal) }"
119 INIT=".init 0 : { *(.init) }"
120 FINI_LIT=".fini.literal 0 : { *(.fini.literal) }"
121 FINI=".fini 0 : { *(.fini) }"
122 if test -z "${NO_SMALL_DATA}"; then
123 SBSS=".sbss ${RELOCATING-0} :
125 ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
127 *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
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} :
136 ${RELOCATING+${SDATA_START_SYMBOLS}}
137 ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
138 *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
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.*}) }"
152 if test -z "${DATA_GOT}"; then
153 if test -n "${NO_SMALL_DATA}"; then
157 if test -z "${SDATA_GOT}"; then
158 if test -z "${NO_SMALL_DATA}"; then
162 test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
163 CTOR=".ctors ${CONSTRUCTING-0} :
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
176 KEEP (*crtbegin*.o(.ctors))
178 /* We don't want to include the .ctor section from
179 the crtend.o file until after the sorted ctors.
180 The .ctor section from the crtend file contains the
181 end of ctors marker and it must be last */
183 KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
184 KEEP (*(SORT(.ctors.*)))
186 ${CONSTRUCTING+${CTOR_END}}
188 DTOR=".dtors ${CONSTRUCTING-0} :
190 ${CONSTRUCTING+${DTOR_START}}
191 KEEP (*crtbegin*.o(.dtors))
192 KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
193 KEEP (*(SORT(.dtors.*)))
195 ${CONSTRUCTING+${DTOR_END}}
197 STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
199 ${RELOCATING+_stack = .;}
203 # if this is for an embedded system, don't add SIZEOF_HEADERS.
204 if [ -z "$EMBEDDED" ]; then
205 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
207 test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
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. */}
225 /* Read-only sections, merged into text segment: */
226 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
227 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
228 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
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) }
240 if [ "x$COMBRELOC" = x ]; then
243 COMBRELOCCAT="cat > $COMBRELOC"
245 eval $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}
255 .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
256 .rela.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
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}
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.*}) }
277 if [ -n "$COMBRELOC" ]; then
279 .rel.dyn ${RELOCATING-0} :
282 sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
285 .rela.dyn ${RELOCATING-0} :
288 sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
294 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
295 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
296 ${OTHER_PLT_RELOC_SECTIONS}
298 ${RELOCATING-$INIT_LIT}
301 ${DATA_PLT-${BSS_PLT-${PLT}}}
302 .text ${RELOCATING-0} :
306 ${RELOCATING+${INIT_START}}
307 ${RELOCATING+KEEP (*(.init.literal))}
308 ${RELOCATING+KEEP (*(.init))}
309 ${RELOCATING+${INIT_END}}
311 ${RELOCATING+${TEXT_START_SYMBOLS}}
312 *(.literal .text .stub${RELOCATING+ .text.* .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*})
313 KEEP (*(.text.*personality*))
314 /* .gnu.warning sections are handled specially by elf32.em. */
316 ${RELOCATING+${OTHER_TEXT_SECTIONS}}
318 ${RELOCATING+${FINI_START}}
319 ${RELOCATING+KEEP (*(.fini.literal))}
320 ${RELOCATING+KEEP (*(.fini))}
321 ${RELOCATING+${FINI_END}}
324 ${RELOCATING-$FINI_LIT}
327 ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
328 ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
329 ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
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) }
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.*) }
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. */
341 ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
342 ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
343 ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
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.*) }
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)} }
353 .preinit_array ${RELOCATING-0} :
355 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}}
356 KEEP (*(.preinit_array))
357 ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}}
359 .init_array ${RELOCATING-0} :
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 = .);}}
366 .fini_array ${RELOCATING-0} :
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 = .);}}
374 ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
375 ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
376 .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
378 ${RELOCATING+${DATARELRO}}
379 ${OTHER_RELRO_SECTIONS}
380 ${TEXT_DYNAMIC-${DYNAMIC}}
381 ${DATA_GOT+${RELRO_NOW+${GOT}}}
382 ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
383 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
384 ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
385 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
386 ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
388 ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
390 .data ${RELOCATING-0} :
392 ${RELOCATING+${DATA_START_SYMBOLS}}
393 *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
394 KEEP (*(.gnu.linkonce.d.*personality*))
395 ${CONSTRUCTING+SORT(CONSTRUCTORS)}
397 .data1 ${RELOCATING-0} : { *(.data1) }
398 ${WRITABLE_RODATA+${RODATA}}
399 ${OTHER_READWRITE_SECTIONS}
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}}}
405 ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
407 ${OTHER_SDATA_SECTIONS}
408 ${RELOCATING+${DATA_END_SYMBOLS-_edata = .; PROVIDE (edata = .);}}
409 ${RELOCATING+__bss_start = .;}
410 ${RELOCATING+${OTHER_BSS_SYMBOLS}}
413 .bss ${RELOCATING-0} :
416 *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
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});}
423 ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
424 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
425 ${RELOCATING+${OTHER_END_SYMBOLS}}
426 ${RELOCATING+_end = .;}
427 ${RELOCATING+PROVIDE (end = .);}
428 ${RELOCATING+${DATA_SEGMENT_END}}
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) }
438 .comment 0 : { *(.comment) }
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. */
445 .debug 0 : { *(.debug) }
446 .line 0 : { *(.line) }
448 /* GNU DWARF 1 extensions */
449 .debug_srcinfo 0 : { *(.debug_srcinfo) }
450 .debug_sfnames 0 : { *(.debug_sfnames) }
452 /* DWARF 1.1 and DWARF 2 */
453 .debug_aranges 0 : { *(.debug_aranges) }
454 .debug_pubnames 0 : { *(.debug_pubnames) }
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) }
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) }
471 ${STACK_ADDR+${STACK}}
473 ${RELOCATING+${OTHER_SYMBOLS}}
474 ${RELOCATING+${STACKNOTE}}