1 /* Script for -pie -z combreloc */
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-littlearm", "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", 0)); . = SEGMENT_START("text-segment", 0) + 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) }
27 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
29 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
30 *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*)
31 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
32 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
33 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
37 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
43 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
45 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
46 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
47 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
48 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
52 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
65 KEEP (*(SORT_NONE(.init)))
71 *(.text.unlikely .text.*_unlikely .text.unlikely.*)
72 *(.text.exit .text.exit.*)
73 *(.text.startup .text.startup.*)
74 *(.text.hot .text.hot.*)
75 *(SORT(.text.sorted.*))
76 *(.text .stub .text.* .gnu.linkonce.t.*)
77 /* .gnu.warning sections are handled specially by elf.em. */
79 *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
83 KEEP (*(SORT_NONE(.fini)))
85 PROVIDE (__etext = .);
88 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
89 .rodata1 : { *(.rodata1) }
90 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
93 PROVIDE_HIDDEN (__exidx_start = .);
94 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
95 PROVIDE_HIDDEN (__exidx_end = .);
97 .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
98 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
99 .sframe : ONLY_IF_RO { *(.sframe) *(.sframe.*) }
100 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
101 .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) }
102 /* These sections are generated by the Sun/Oracle C++ compiler. */
103 .exception_ranges : ONLY_IF_RO { *(.exception_ranges*) }
104 /* Adjust the address for the data segment. We want to adjust up to
105 the same address within the page on the next page up. */
106 . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1));
107 /* Exception handling */
108 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
109 .sframe : ONLY_IF_RW { *(.sframe) *(.sframe.*) }
110 .gnu_extab : ONLY_IF_RW { *(.gnu_extab) }
111 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
112 .exception_ranges : ONLY_IF_RW { *(.exception_ranges*) }
113 /* Thread Local Storage sections */
116 PROVIDE_HIDDEN (__tdata_start = .);
117 *(.tdata .tdata.* .gnu.linkonce.td.*)
119 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
122 PROVIDE_HIDDEN (__preinit_array_start = .);
123 KEEP (*(.preinit_array))
124 PROVIDE_HIDDEN (__preinit_array_end = .);
128 PROVIDE_HIDDEN (__init_array_start = .);
129 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
130 KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
131 PROVIDE_HIDDEN (__init_array_end = .);
135 PROVIDE_HIDDEN (__fini_array_start = .);
136 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
137 KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
138 PROVIDE_HIDDEN (__fini_array_end = .);
142 /* gcc uses crtbegin.o to find the start of
143 the constructors, so we make sure it is
144 first. Because this is a wildcard, it
145 doesn't matter if the user does not
146 actually link against crtbegin.o; the
147 linker won't look for a file to match a
148 wildcard. The wildcard also means that it
149 doesn't matter which directory crtbegin.o
151 KEEP (*crtbegin.o(.ctors))
152 KEEP (*crtbegin?.o(.ctors))
153 /* We don't want to include the .ctor section from
154 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 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
158 KEEP (*(SORT(.ctors.*)))
163 KEEP (*crtbegin.o(.dtors))
164 KEEP (*crtbegin?.o(.dtors))
165 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
166 KEEP (*(SORT(.dtors.*)))
169 .jcr : { KEEP (*(.jcr)) }
170 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
171 .dynamic : { *(.dynamic) }
172 .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
176 *(.data .data.* .gnu.linkonce.d.*)
179 .data1 : { *(.data1) }
180 _edata = .; PROVIDE (edata = .);
181 /* This section contains data that is initialized during load,
182 but not during the application's initialization sequence. */
186 PROVIDE (__persistent_start = .);
187 *(.persistent .persistent.* .gnu.linkonce.p.*)
189 PROVIDE (__persistent_end = .);
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__ = .;
207 /* This section contains data that is not initialized during load,
208 or during the application's initialization sequence. */
212 PROVIDE (__noinit_start = .);
213 *(.noinit .noinit.* .gnu.linkonce.n.*)
215 PROVIDE (__noinit_end = .);
218 . = SEGMENT_START("ldata-segment", .);
221 _end = .; PROVIDE (end = .);
227 /* Stabs debugging sections. */
228 .stab 0 : { *(.stab) }
229 .stabstr 0 : { *(.stabstr) }
230 .stab.excl 0 : { *(.stab.excl) }
231 .stab.exclstr 0 : { *(.stab.exclstr) }
232 .stab.index 0 : { *(.stab.index) }
233 .stab.indexstr 0 : { *(.stab.indexstr) }
234 .comment 0 : { *(.comment) }
235 .gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
236 /* DWARF debug sections.
237 Symbols in the DWARF debugging sections are relative to the beginning
238 of the section so we begin them at 0. */
240 .debug 0 : { *(.debug) }
241 .line 0 : { *(.line) }
242 /* GNU DWARF 1 extensions. */
243 .debug_srcinfo 0 : { *(.debug_srcinfo) }
244 .debug_sfnames 0 : { *(.debug_sfnames) }
245 /* DWARF 1.1 and DWARF 2. */
246 .debug_aranges 0 : { *(.debug_aranges) }
247 .debug_pubnames 0 : { *(.debug_pubnames) }
249 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
250 .debug_abbrev 0 : { *(.debug_abbrev) }
251 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
252 .debug_frame 0 : { *(.debug_frame) }
253 .debug_str 0 : { *(.debug_str) }
254 .debug_loc 0 : { *(.debug_loc) }
255 .debug_macinfo 0 : { *(.debug_macinfo) }
256 /* SGI/MIPS DWARF 2 extensions. */
257 .debug_weaknames 0 : { *(.debug_weaknames) }
258 .debug_funcnames 0 : { *(.debug_funcnames) }
259 .debug_typenames 0 : { *(.debug_typenames) }
260 .debug_varnames 0 : { *(.debug_varnames) }
262 .debug_pubtypes 0 : { *(.debug_pubtypes) }
263 .debug_ranges 0 : { *(.debug_ranges) }
265 .debug_addr 0 : { *(.debug_addr) }
266 .debug_line_str 0 : { *(.debug_line_str) }
267 .debug_loclists 0 : { *(.debug_loclists) }
268 .debug_macro 0 : { *(.debug_macro) }
269 .debug_names 0 : { *(.debug_names) }
270 .debug_rnglists 0 : { *(.debug_rnglists) }
271 .debug_str_offsets 0 : { *(.debug_str_offsets) }
272 .debug_sup 0 : { *(.debug_sup) }
273 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
274 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
275 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }