1 /* Default linker script, for normal executables */
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/aarch64-linux-gnu/lib");
13 /* Read-only sections, merged into text segment: */
14 PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x00010000)); . = SEGMENT_START("text-segment", 0x00010000) + SIZEOF_HEADERS;
15 .interp : { *(.interp) }
16 .note.gnu.build-id : { *(.note.gnu.build-id) }
18 .gnu.hash : { *(.gnu.hash) }
19 .dynsym : { *(.dynsym) }
20 .dynstr : { *(.dynstr) }
21 .gnu.version : { *(.gnu.version) }
22 .gnu.version_d : { *(.gnu.version_d) }
23 .gnu.version_r : { *(.gnu.version_r) }
24 .rel.init : { *(.rel.init) }
25 .rela.init : { *(.rela.init) }
26 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
27 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
28 .rel.fini : { *(.rel.fini) }
29 .rela.fini : { *(.rela.fini) }
30 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
31 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
32 .rel.data.rel.ro : { *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) }
33 .rela.data.rel.ro : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
34 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
35 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
36 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
37 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
38 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
39 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
40 .rel.ctors : { *(.rel.ctors) }
41 .rela.ctors : { *(.rela.ctors) }
42 .rel.dtors : { *(.rel.dtors) }
43 .rela.dtors : { *(.rela.dtors) }
44 .rel.got : { *(.rel.got) }
45 .rela.got : { *(.rela.got) }
46 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
47 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
50 PROVIDE_HIDDEN (__rel_iplt_start = .);
52 PROVIDE_HIDDEN (__rel_iplt_end = .);
56 PROVIDE_HIDDEN (__rela_iplt_start = .);
58 PROVIDE_HIDDEN (__rela_iplt_end = .);
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 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
94 .rodata1 : { *(.rodata1) }
95 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
98 PROVIDE_HIDDEN (__exidx_start = .);
99 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
100 PROVIDE_HIDDEN (__exidx_end = .);
102 .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
103 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
104 .sframe : ONLY_IF_RO { *(.sframe) *(.sframe.*) }
105 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
106 .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) }
107 /* These sections are generated by the Sun/Oracle C++ compiler. */
108 .exception_ranges : ONLY_IF_RO { *(.exception_ranges*) }
109 /* Adjust the address for the data segment. We want to adjust up to
110 the same address within the page on the next page up. */
111 . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
112 /* Exception handling */
113 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
114 .sframe : ONLY_IF_RW { *(.sframe) *(.sframe.*) }
115 .gnu_extab : ONLY_IF_RW { *(.gnu_extab) }
116 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
117 .exception_ranges : ONLY_IF_RW { *(.exception_ranges*) }
118 /* Thread Local Storage sections */
121 PROVIDE_HIDDEN (__tdata_start = .);
122 *(.tdata .tdata.* .gnu.linkonce.td.*)
124 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
127 PROVIDE_HIDDEN (__preinit_array_start = .);
128 KEEP (*(.preinit_array))
129 PROVIDE_HIDDEN (__preinit_array_end = .);
133 PROVIDE_HIDDEN (__init_array_start = .);
134 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
135 KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
136 PROVIDE_HIDDEN (__init_array_end = .);
140 PROVIDE_HIDDEN (__fini_array_start = .);
141 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
142 KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
143 PROVIDE_HIDDEN (__fini_array_end = .);
147 /* gcc uses crtbegin.o to find the start of
148 the constructors, so we make sure it is
149 first. Because this is a wildcard, it
150 doesn't matter if the user does not
151 actually link against crtbegin.o; the
152 linker won't look for a file to match a
153 wildcard. The wildcard also means that it
154 doesn't matter which directory crtbegin.o
156 KEEP (*crtbegin.o(.ctors))
157 KEEP (*crtbegin?.o(.ctors))
158 /* We don't want to include the .ctor section from
159 the crtend.o file until after the sorted ctors.
160 The .ctor section from the crtend file contains the
161 end of ctors marker and it must be last */
162 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
163 KEEP (*(SORT(.ctors.*)))
168 KEEP (*crtbegin.o(.dtors))
169 KEEP (*crtbegin?.o(.dtors))
170 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
171 KEEP (*(SORT(.dtors.*)))
174 .jcr : { KEEP (*(.jcr)) }
175 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
176 .dynamic : { *(.dynamic) }
177 . = DATA_SEGMENT_RELRO_END (0, .);
178 .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
181 PROVIDE (__data_start = .);
182 *(.data .data.* .gnu.linkonce.d.*)
185 .data1 : { *(.data1) }
186 _edata = .; PROVIDE (edata = .);
193 *(.bss .bss.* .gnu.linkonce.b.*)
195 /* Align here to ensure that the .bss section occupies space up to
196 _end. Align after .bss to ensure correct alignment even if the
197 .bss section disappears because there are no input sections.
198 FIXME: Why do we need it? When there is no .bss section, we do not
199 pad the .data section. */
200 . = ALIGN(. != 0 ? 32 / 8 : 1);
202 _bss_end__ = .; __bss_end__ = .;
204 . = SEGMENT_START("ldata-segment", .);
207 _end = .; PROVIDE (end = .);
208 . = DATA_SEGMENT_END (.);
209 /* Stabs debugging sections. */
210 .stab 0 : { *(.stab) }
211 .stabstr 0 : { *(.stabstr) }
212 .stab.excl 0 : { *(.stab.excl) }
213 .stab.exclstr 0 : { *(.stab.exclstr) }
214 .stab.index 0 : { *(.stab.index) }
215 .stab.indexstr 0 : { *(.stab.indexstr) }
216 .comment 0 : { *(.comment) }
217 .gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
218 /* DWARF debug sections.
219 Symbols in the DWARF debugging sections are relative to the beginning
220 of the section so we begin them at 0. */
222 .debug 0 : { *(.debug) }
223 .line 0 : { *(.line) }
224 /* GNU DWARF 1 extensions. */
225 .debug_srcinfo 0 : { *(.debug_srcinfo) }
226 .debug_sfnames 0 : { *(.debug_sfnames) }
227 /* DWARF 1.1 and DWARF 2. */
228 .debug_aranges 0 : { *(.debug_aranges) }
229 .debug_pubnames 0 : { *(.debug_pubnames) }
231 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
232 .debug_abbrev 0 : { *(.debug_abbrev) }
233 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
234 .debug_frame 0 : { *(.debug_frame) }
235 .debug_str 0 : { *(.debug_str) }
236 .debug_loc 0 : { *(.debug_loc) }
237 .debug_macinfo 0 : { *(.debug_macinfo) }
238 /* SGI/MIPS DWARF 2 extensions. */
239 .debug_weaknames 0 : { *(.debug_weaknames) }
240 .debug_funcnames 0 : { *(.debug_funcnames) }
241 .debug_typenames 0 : { *(.debug_typenames) }
242 .debug_varnames 0 : { *(.debug_varnames) }
244 .debug_pubtypes 0 : { *(.debug_pubtypes) }
245 .debug_ranges 0 : { *(.debug_ranges) }
247 .debug_addr 0 : { *(.debug_addr) }
248 .debug_line_str 0 : { *(.debug_line_str) }
249 .debug_loclists 0 : { *(.debug_loclists) }
250 .debug_macro 0 : { *(.debug_macro) }
251 .debug_names 0 : { *(.debug_names) }
252 .debug_rnglists 0 : { *(.debug_rnglists) }
253 .debug_str_offsets 0 : { *(.debug_str_offsets) }
254 .debug_sup 0 : { *(.debug_sup) }
255 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
256 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
257 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }