1 /* Script for -z separate-code */
2 /* Copyright (C) 2014-2023 Free Software Foundation, Inc.
3 Copying and distribution of this script, with or without modification,
4 are permitted in any medium without royalty provided the copyright
5 notice and this notice are preserved. */
6 OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm",
10 SEARCH_DIR("/home/runner/work/tc-build/tc-build/install/arm-linux-gnueabi/lib");
13 PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS;
14 .interp : { *(.interp) }
15 .note.gnu.build-id : { *(.note.gnu.build-id) }
17 .gnu.hash : { *(.gnu.hash) }
18 .dynsym : { *(.dynsym) }
19 .dynstr : { *(.dynstr) }
20 .gnu.version : { *(.gnu.version) }
21 .gnu.version_d : { *(.gnu.version_d) }
22 .gnu.version_r : { *(.gnu.version_r) }
23 .rel.init : { *(.rel.init) }
24 .rela.init : { *(.rela.init) }
25 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
26 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
27 .rel.fini : { *(.rel.fini) }
28 .rela.fini : { *(.rela.fini) }
29 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
30 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
31 .rel.data.rel.ro : { *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) }
32 .rela.data.rel.ro : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
33 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
34 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
35 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
36 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
37 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
38 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
39 .rel.ctors : { *(.rel.ctors) }
40 .rela.ctors : { *(.rela.ctors) }
41 .rel.dtors : { *(.rel.dtors) }
42 .rela.dtors : { *(.rela.dtors) }
43 .rel.got : { *(.rel.got) }
44 .rela.got : { *(.rela.got) }
45 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
46 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
49 PROVIDE_HIDDEN (__rel_iplt_start = .);
51 PROVIDE_HIDDEN (__rel_iplt_end = .);
55 PROVIDE_HIDDEN (__rela_iplt_start = .);
57 PROVIDE_HIDDEN (__rela_iplt_end = .);
67 . = ALIGN(CONSTANT (MAXPAGESIZE));
70 KEEP (*(SORT_NONE(.init)))
76 *(.text.unlikely .text.*_unlikely .text.unlikely.*)
77 *(.text.exit .text.exit.*)
78 *(.text.startup .text.startup.*)
79 *(.text.hot .text.hot.*)
80 *(SORT(.text.sorted.*))
81 *(.text .stub .text.* .gnu.linkonce.t.*)
82 /* .gnu.warning sections are handled specially by elf.em. */
84 *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
88 KEEP (*(SORT_NONE(.fini)))
90 PROVIDE (__etext = .);
93 . = ALIGN(CONSTANT (MAXPAGESIZE));
94 /* Adjust the address for the rodata segment. We want to adjust up to
95 the same address within the page on the next page up. */
96 . = SEGMENT_START("rodata-segment", ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)));
97 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
98 .rodata1 : { *(.rodata1) }
99 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
102 PROVIDE_HIDDEN (__exidx_start = .);
103 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
104 PROVIDE_HIDDEN (__exidx_end = .);
106 .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
107 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
108 .sframe : ONLY_IF_RO { *(.sframe) *(.sframe.*) }
109 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
110 .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) }
111 /* These sections are generated by the Sun/Oracle C++ compiler. */
112 .exception_ranges : ONLY_IF_RO { *(.exception_ranges*) }
113 /* Adjust the address for the data segment. We want to adjust up to
114 the same address within the page on the next page up. */
115 . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
116 /* Exception handling */
117 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
118 .sframe : ONLY_IF_RW { *(.sframe) *(.sframe.*) }
119 .gnu_extab : ONLY_IF_RW { *(.gnu_extab) }
120 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
121 .exception_ranges : ONLY_IF_RW { *(.exception_ranges*) }
122 /* Thread Local Storage sections */
125 PROVIDE_HIDDEN (__tdata_start = .);
126 *(.tdata .tdata.* .gnu.linkonce.td.*)
128 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
131 PROVIDE_HIDDEN (__preinit_array_start = .);
132 KEEP (*(.preinit_array))
133 PROVIDE_HIDDEN (__preinit_array_end = .);
137 PROVIDE_HIDDEN (__init_array_start = .);
138 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
139 KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
140 PROVIDE_HIDDEN (__init_array_end = .);
144 PROVIDE_HIDDEN (__fini_array_start = .);
145 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
146 KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
147 PROVIDE_HIDDEN (__fini_array_end = .);
151 /* gcc uses crtbegin.o to find the start of
152 the constructors, so we make sure it is
153 first. Because this is a wildcard, it
154 doesn't matter if the user does not
155 actually link against crtbegin.o; the
156 linker won't look for a file to match a
157 wildcard. The wildcard also means that it
158 doesn't matter which directory crtbegin.o
160 KEEP (*crtbegin.o(.ctors))
161 KEEP (*crtbegin?.o(.ctors))
162 /* We don't want to include the .ctor section from
163 the crtend.o file until after the sorted ctors.
164 The .ctor section from the crtend file contains the
165 end of ctors marker and it must be last */
166 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
167 KEEP (*(SORT(.ctors.*)))
172 KEEP (*crtbegin.o(.dtors))
173 KEEP (*crtbegin?.o(.dtors))
174 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
175 KEEP (*(SORT(.dtors.*)))
178 .jcr : { KEEP (*(.jcr)) }
179 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
180 .dynamic : { *(.dynamic) }
181 . = DATA_SEGMENT_RELRO_END (0, .);
182 .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
185 PROVIDE (__data_start = .);
186 *(.data .data.* .gnu.linkonce.d.*)
189 .data1 : { *(.data1) }
190 _edata = .; PROVIDE (edata = .);
197 *(.bss .bss.* .gnu.linkonce.b.*)
199 /* Align here to ensure that the .bss section occupies space up to
200 _end. Align after .bss to ensure correct alignment even if the
201 .bss section disappears because there are no input sections.
202 FIXME: Why do we need it? When there is no .bss section, we do not
203 pad the .data section. */
204 . = ALIGN(. != 0 ? 32 / 8 : 1);
206 _bss_end__ = .; __bss_end__ = .;
208 . = SEGMENT_START("ldata-segment", .);
211 _end = .; PROVIDE (end = .);
212 . = DATA_SEGMENT_END (.);
213 /* Stabs debugging sections. */
214 .stab 0 : { *(.stab) }
215 .stabstr 0 : { *(.stabstr) }
216 .stab.excl 0 : { *(.stab.excl) }
217 .stab.exclstr 0 : { *(.stab.exclstr) }
218 .stab.index 0 : { *(.stab.index) }
219 .stab.indexstr 0 : { *(.stab.indexstr) }
220 .comment 0 : { *(.comment) }
221 .gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
222 /* DWARF debug sections.
223 Symbols in the DWARF debugging sections are relative to the beginning
224 of the section so we begin them at 0. */
226 .debug 0 : { *(.debug) }
227 .line 0 : { *(.line) }
228 /* GNU DWARF 1 extensions. */
229 .debug_srcinfo 0 : { *(.debug_srcinfo) }
230 .debug_sfnames 0 : { *(.debug_sfnames) }
231 /* DWARF 1.1 and DWARF 2. */
232 .debug_aranges 0 : { *(.debug_aranges) }
233 .debug_pubnames 0 : { *(.debug_pubnames) }
235 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
236 .debug_abbrev 0 : { *(.debug_abbrev) }
237 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
238 .debug_frame 0 : { *(.debug_frame) }
239 .debug_str 0 : { *(.debug_str) }
240 .debug_loc 0 : { *(.debug_loc) }
241 .debug_macinfo 0 : { *(.debug_macinfo) }
242 /* SGI/MIPS DWARF 2 extensions. */
243 .debug_weaknames 0 : { *(.debug_weaknames) }
244 .debug_funcnames 0 : { *(.debug_funcnames) }
245 .debug_typenames 0 : { *(.debug_typenames) }
246 .debug_varnames 0 : { *(.debug_varnames) }
248 .debug_pubtypes 0 : { *(.debug_pubtypes) }
249 .debug_ranges 0 : { *(.debug_ranges) }
251 .debug_addr 0 : { *(.debug_addr) }
252 .debug_line_str 0 : { *(.debug_line_str) }
253 .debug_loclists 0 : { *(.debug_loclists) }
254 .debug_macro 0 : { *(.debug_macro) }
255 .debug_names 0 : { *(.debug_names) }
256 .debug_rnglists 0 : { *(.debug_rnglists) }
257 .debug_str_offsets 0 : { *(.debug_str_offsets) }
258 .debug_sup 0 : { *(.debug_sup) }
259 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
260 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
261 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }