1 /* Default linker script, for normal executables */
2 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc",
6 SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
13 ro PT_LOAD FILEHDR PHDRS;
22 /* Read-only sections, merged into text segment: */
23 PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + SIZEOF_HEADERS;
24 .interp : { *(.interp) }
25 .note.gnu.build-id : { *(.note.gnu.build-id) }
27 .gnu.hash : { *(.gnu.hash) }
28 .dynsym : { *(.dynsym) }
29 .dynstr : { *(.dynstr) }
30 .gnu.version : { *(.gnu.version) }
31 .gnu.version_d : { *(.gnu.version_d) }
32 .gnu.version_r : { *(.gnu.version_r) }
33 .rel.init : { *(.rel.init) }
34 .rela.init : { *(.rela.init) }
35 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
36 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
37 .rel.fini : { *(.rel.fini) }
38 .rela.fini : { *(.rela.fini) }
39 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
40 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
41 .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
42 .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
43 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
44 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
45 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
46 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
47 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
48 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
49 .rel.ctors : { *(.rel.ctors) }
50 .rela.ctors : { *(.rela.ctors) }
51 .rel.dtors : { *(.rel.dtors) }
52 .rela.dtors : { *(.rela.dtors) }
53 .rel.got : { *(.rel.got) }
54 .rela.got : { *(.rela.got) }
55 .rela.got1 : { *(.rela.got1) }
56 .rela.got2 : { *(.rela.got2) }
57 .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
58 .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
59 .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
60 .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
61 .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
62 .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
63 .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
64 .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
65 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
66 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
67 .rel.plt : { *(.rel.plt) }
68 .rela.plt : { *(.rela.plt) }
75 *(.text .stub .text.* .gnu.linkonce.t.*)
77 KEEP (*(.text.*personality*))
78 /* .gnu.warning sections are handled specially by elf32.em. */
86 PROVIDE (__etext = .);
90 KEEP (*(.rol4re_elf_aux))
92 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } : ro
93 .rodata1 : { *(.rodata1) }
96 PROVIDE (_SDA2_BASE_ = 32768);
97 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
99 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
100 .eh_frame_hdr : { *(.eh_frame_hdr) }
101 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
102 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
103 /* Adjust the address for the data segment. We want to adjust up to
104 the same address within the page on the next page up. */
105 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
106 /* Exception handling */
107 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
108 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
109 /* Thread Local Storage sections */
110 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
111 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
114 PROVIDE_HIDDEN (__preinit_array_start = .);
115 KEEP (*(.preinit_array))
116 PROVIDE_HIDDEN (__preinit_array_end = .);
120 PROVIDE_HIDDEN (__init_array_start = .);
121 KEEP (*(SORT(.init_array.*)))
122 KEEP (*(.init_array))
123 PROVIDE_HIDDEN (__init_array_end = .);
127 PROVIDE_HIDDEN (__fini_array_start = .);
128 KEEP (*(.fini_array))
129 KEEP (*(SORT(.fini_array.*)))
130 PROVIDE_HIDDEN (__fini_array_end = .);
135 /* gcc uses crtbegin.o to find the start of
136 the constructors, so we make sure it is
137 first. Because this is a wildcard, it
138 doesn't matter if the user does not
139 actually link against crtbegin.o; the
140 linker won't look for a file to match a
141 wildcard. The wildcard also means that it
142 doesn't matter which directory crtbegin.o
144 KEEP (*crtbegin.o(.ctors))
145 KEEP (*crtbegin?.o(.ctors))
146 /* We don't want to include the .ctor section from
147 the crtend.o file until after the sorted ctors.
148 The .ctor section from the crtend file contains the
149 end of ctors marker and it must be last */
150 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
151 KEEP (*(SORT(.ctors.*)))
156 KEEP (*crtbegin.o(.dtors))
157 KEEP (*crtbegin?.o(.dtors))
158 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
159 KEEP (*(SORT(.dtors.*)))
164 .jcr : { KEEP (*(.jcr)) }
165 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
168 .dynamic : { *(.dynamic) }
169 .got : SPECIAL { *(.got) }
170 . = DATA_SEGMENT_RELRO_END (0, .);
171 .plt : SPECIAL { *(.plt) }
174 *(.data .data.* .gnu.linkonce.d.*)
175 KEEP (*(.gnu.linkonce.d.*personality*))
178 .data1 : { *(.data1) }
179 .got : SPECIAL { *(.got) }
180 /* We want the small data sections together, so single-instruction offsets
181 can access them all, and initialized data all before uninitialized, so
182 we can shorten the on-disk segment size. */
185 PROVIDE (_SDA_BASE_ = 32768);
186 *(.sdata .sdata.* .gnu.linkonce.s.*)
188 _edata = .; PROVIDE (edata = .);
192 PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
194 *(.sbss .sbss.* .gnu.linkonce.sb.*)
196 PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
198 .plt : SPECIAL { *(.plt) }
202 *(.bss .bss.* .gnu.linkonce.b.*)
204 /* Align here to ensure that the .bss section occupies space up to
205 _end. Align after .bss to ensure correct alignment even if the
206 .bss section disappears because there are no input sections.
207 FIXME: Why do we need it? When there is no .bss section, we don't
208 pad the .data section. */
209 . = ALIGN(. != 0 ? 32 / 8 : 1);
213 _end = .; PROVIDE (end = .);
214 . = DATA_SEGMENT_END (.);
215 /* Stabs debugging sections. */
216 .stab 0 : { *(.stab) }
217 .stabstr 0 : { *(.stabstr) }
218 .stab.excl 0 : { *(.stab.excl) }
219 .stab.exclstr 0 : { *(.stab.exclstr) }
220 .stab.index 0 : { *(.stab.index) }
221 .stab.indexstr 0 : { *(.stab.indexstr) }
222 .comment 0 : { *(.comment) }
223 /* DWARF debug sections.
224 Symbols in the DWARF debugging sections are relative to the beginning
225 of the section so we begin them at 0. */
227 .debug 0 : { *(.debug) }
228 .line 0 : { *(.line) }
229 /* GNU DWARF 1 extensions */
230 .debug_srcinfo 0 : { *(.debug_srcinfo) }
231 .debug_sfnames 0 : { *(.debug_sfnames) }
232 /* DWARF 1.1 and DWARF 2 */
233 .debug_aranges 0 : { *(.debug_aranges) }
234 .debug_pubnames 0 : { *(.debug_pubnames) }
236 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
237 .debug_abbrev 0 : { *(.debug_abbrev) }
238 .debug_line 0 : { *(.debug_line) }
239 .debug_frame 0 : { *(.debug_frame) }
240 .debug_str 0 : { *(.debug_str) }
241 .debug_loc 0 : { *(.debug_loc) }
242 .debug_macinfo 0 : { *(.debug_macinfo) }
243 /* SGI/MIPS DWARF 2 extensions */
244 .debug_weaknames 0 : { *(.debug_weaknames) }
245 .debug_funcnames 0 : { *(.debug_funcnames) }
246 .debug_typenames 0 : { *(.debug_typenames) }
247 .debug_varnames 0 : { *(.debug_varnames) }
249 .debug_pubtypes 0 : { *(.debug_pubtypes) }
250 .debug_ranges 0 : { *(.debug_ranges) }
251 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
252 /DISCARD/ : { *(.fixup) }
253 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }