1 /* Default linker script, for normal executables */
2 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc",
12 ro PT_LOAD FILEHDR PHDRS;
21 /* Read-only sections, merged into text segment: */
22 PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + SIZEOF_HEADERS;
23 .interp : { *(.interp) }
24 .note.gnu.build-id : { *(.note.gnu.build-id) }
26 .gnu.hash : { *(.gnu.hash) }
27 .dynsym : { *(.dynsym) }
28 .dynstr : { *(.dynstr) }
29 .gnu.version : { *(.gnu.version) }
30 .gnu.version_d : { *(.gnu.version_d) }
31 .gnu.version_r : { *(.gnu.version_r) }
32 .rel.init : { *(.rel.init) }
33 .rela.init : { *(.rela.init) }
34 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
35 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
36 .rel.fini : { *(.rel.fini) }
37 .rela.fini : { *(.rela.fini) }
38 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
39 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
40 .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
41 .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
42 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
43 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
44 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
45 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
46 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
47 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
48 .rel.ctors : { *(.rel.ctors) }
49 .rela.ctors : { *(.rela.ctors) }
50 .rel.dtors : { *(.rel.dtors) }
51 .rela.dtors : { *(.rela.dtors) }
52 .rel.got : { *(.rel.got) }
53 .rela.got : { *(.rela.got) }
54 .rela.got1 : { *(.rela.got1) }
55 .rela.got2 : { *(.rela.got2) }
56 .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
57 .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
58 .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
59 .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
60 .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
61 .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
62 .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
63 .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
64 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
65 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
66 .rel.plt : { *(.rel.plt) }
67 .rela.plt : { *(.rela.plt) }
74 *(.text .stub .text.* .gnu.linkonce.t.*)
76 KEEP (*(.text.*personality*))
77 /* .gnu.warning sections are handled specially by elf32.em. */
85 PROVIDE (__etext = .);
89 KEEP (*(.rol4re_elf_aux))
91 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } : ro
92 .rodata1 : { *(.rodata1) }
95 PROVIDE (_SDA2_BASE_ = 32768);
96 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
98 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
99 .eh_frame_hdr : { *(.eh_frame_hdr) }
100 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
101 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
102 /* Adjust the address for the data segment. We want to adjust up to
103 the same address within the page on the next page up. */
104 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
105 /* Exception handling */
106 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
107 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
108 /* Thread Local Storage sections */
109 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
110 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
113 PROVIDE_HIDDEN (__preinit_array_start = .);
114 KEEP (*(.preinit_array))
115 PROVIDE_HIDDEN (__preinit_array_end = .);
119 PROVIDE_HIDDEN (__init_array_start = .);
120 KEEP (*(SORT(.init_array.*)))
121 KEEP (*(.init_array))
122 PROVIDE_HIDDEN (__init_array_end = .);
126 PROVIDE_HIDDEN (__fini_array_start = .);
127 KEEP (*(.fini_array))
128 KEEP (*(SORT(.fini_array.*)))
129 PROVIDE_HIDDEN (__fini_array_end = .);
134 /* gcc uses crtbegin.o to find the start of
135 the constructors, so we make sure it is
136 first. Because this is a wildcard, it
137 doesn't matter if the user does not
138 actually link against crtbegin.o; the
139 linker won't look for a file to match a
140 wildcard. The wildcard also means that it
141 doesn't matter which directory crtbegin.o
143 KEEP (*crtbegin.o(.ctors))
144 KEEP (*crtbegin?.o(.ctors))
145 /* We don't want to include the .ctor section from
146 the crtend.o file until after the sorted ctors.
147 The .ctor section from the crtend file contains the
148 end of ctors marker and it must be last */
149 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
150 KEEP (*(SORT(.ctors.*)))
155 KEEP (*crtbegin.o(.dtors))
156 KEEP (*crtbegin?.o(.dtors))
157 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
158 KEEP (*(SORT(.dtors.*)))
163 .jcr : { KEEP (*(.jcr)) }
164 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
167 .dynamic : { *(.dynamic) }
168 .got : SPECIAL { *(.got) }
169 . = DATA_SEGMENT_RELRO_END (0, .);
170 .plt : SPECIAL { *(.plt) }
173 *(.data .data.* .gnu.linkonce.d.*)
174 KEEP (*(.gnu.linkonce.d.*personality*))
177 .data1 : { *(.data1) }
178 .got : SPECIAL { *(.got) }
179 /* We want the small data sections together, so single-instruction offsets
180 can access them all, and initialized data all before uninitialized, so
181 we can shorten the on-disk segment size. */
184 PROVIDE (_SDA_BASE_ = 32768);
185 *(.sdata .sdata.* .gnu.linkonce.s.*)
187 _edata = .; PROVIDE (edata = .);
191 PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
193 *(.sbss .sbss.* .gnu.linkonce.sb.*)
195 PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
197 .plt : SPECIAL { *(.plt) }
201 *(.bss .bss.* .gnu.linkonce.b.*)
203 /* Align here to ensure that the .bss section occupies space up to
204 _end. Align after .bss to ensure correct alignment even if the
205 .bss section disappears because there are no input sections.
206 FIXME: Why do we need it? When there is no .bss section, we don't
207 pad the .data section. */
208 . = ALIGN(. != 0 ? 32 / 8 : 1);
212 _end = .; PROVIDE (end = .);
213 . = DATA_SEGMENT_END (.);
214 /* Stabs debugging sections. */
215 .stab 0 : { *(.stab) }
216 .stabstr 0 : { *(.stabstr) }
217 .stab.excl 0 : { *(.stab.excl) }
218 .stab.exclstr 0 : { *(.stab.exclstr) }
219 .stab.index 0 : { *(.stab.index) }
220 .stab.indexstr 0 : { *(.stab.indexstr) }
221 .comment 0 : { *(.comment) }
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) }
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) }
250 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
251 /DISCARD/ : { *(.fixup) }
252 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }