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