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