1 /* Linker script for klibc.so, needed because of the the damned
2 GNU ld script headers problem */
4 OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips",
5 "elf32-tradlittlemips")
10 /* Read-only sections, merged into text segment: */
11 /* This address needs to be reachable using normal inter-module
12 calls, and work on the memory models for this architecture */
13 /* 2 MB -- the normal starting point for text is 4 MB */
15 .interp : { *(.interp) }
16 .reginfo : { *(.reginfo) }
17 .dynamic : { *(.dynamic) }
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.data.* .rel.gnu.linkonce.d.*)
31 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
32 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
36 *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
37 *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
38 *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
39 *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
40 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
45 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
47 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
48 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
49 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
50 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
54 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
55 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
56 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
57 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
58 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
60 .rel.plt : { *(.rel.plt) }
61 .rela.plt : { *(.rela.plt) }
70 *(.text .stub .text.* .gnu.linkonce.t.*)
71 /* .gnu.warning sections are handled specially by elf32.em. */
73 *(.mips16.fn.*) *(.mips16.call.*)
79 PROVIDE (__etext = .);
82 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
83 .rodata1 : { *(.rodata1) }
84 .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
85 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
86 .eh_frame_hdr : { *(.eh_frame_hdr) }
87 /* Adjust the address for the data segment. We want to adjust up to
88 the same address within the page on the next page up. */
90 /* Ensure the __preinit_array_start label is properly aligned. We
91 could instead move the label definition inside the section, but
92 the linker would then create the section even if it turns out to
93 be empty, which isn't pretty. */
95 PROVIDE (__preinit_array_start = .);
96 .preinit_array : { *(.preinit_array) }
97 PROVIDE (__preinit_array_end = .);
98 PROVIDE (__init_array_start = .);
99 .init_array : { *(.init_array) }
100 PROVIDE (__init_array_end = .);
101 PROVIDE (__fini_array_start = .);
102 .fini_array : { *(.fini_array) }
103 PROVIDE (__fini_array_end = .);
107 *(.data .data.* .gnu.linkonce.d.*)
110 .data1 : { *(.data1) }
111 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
112 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
113 .eh_frame : { KEEP (*(.eh_frame)) }
114 .gcc_except_table : { *(.gcc_except_table) }
117 /* gcc uses crtbegin.o to find the start of
118 the constructors, so we make sure it is
119 first. Because this is a wildcard, it
120 doesn't matter if the user does not
121 actually link against crtbegin.o; the
122 linker won't look for a file to match a
123 wildcard. The wildcard also means that it
124 doesn't matter which directory crtbegin.o
126 KEEP (*crtbegin*.o(.ctors))
127 /* We don't want to include the .ctor section from
128 from the crtend.o file until after the sorted ctors.
129 The .ctor section from the crtend file contains the
130 end of ctors marker and it must be last */
131 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
132 KEEP (*(SORT(.ctors.*)))
137 KEEP (*crtbegin*.o(.dtors))
138 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
139 KEEP (*(SORT(.dtors.*)))
142 .jcr : { KEEP (*(.jcr)) }
143 _gp = ALIGN(16) + 0x7ff0;
144 .got : { *(.got.plt) *(.got) }
145 /* We want the small data sections together, so single-instruction offsets
146 can access them all, and initialized data all before uninitialized, so
147 we can shorten the on-disk segment size. */
150 *(.sdata .sdata.* .gnu.linkonce.s.*)
160 PROVIDE (__sbss_start = .);
161 PROVIDE (___sbss_start = .);
163 *(.sbss .sbss.* .gnu.linkonce.sb.*)
165 PROVIDE (__sbss_end = .);
166 PROVIDE (___sbss_end = .);
171 *(.bss .bss.* .gnu.linkonce.b.*)
173 /* Align here to ensure that the .bss section occupies space up to
174 _end. Align after .bss to ensure correct alignment even if the
175 .bss section disappears because there are no input sections. */
181 /* Stabs debugging sections. */
182 .stab 0 : { *(.stab) }
183 .stabstr 0 : { *(.stabstr) }
184 .stab.excl 0 : { *(.stab.excl) }
185 .stab.exclstr 0 : { *(.stab.exclstr) }
186 .stab.index 0 : { *(.stab.index) }
187 .stab.indexstr 0 : { *(.stab.indexstr) }
188 .comment 0 : { *(.comment) }
189 /* DWARF debug sections.
190 Symbols in the DWARF debugging sections are relative to the beginning
191 of the section so we begin them at 0. */
193 .debug 0 : { *(.debug) }
194 .line 0 : { *(.line) }
195 /* GNU DWARF 1 extensions */
196 .debug_srcinfo 0 : { *(.debug_srcinfo) }
197 .debug_sfnames 0 : { *(.debug_sfnames) }
198 /* DWARF 1.1 and DWARF 2 */
199 .debug_aranges 0 : { *(.debug_aranges) }
200 .debug_pubnames 0 : { *(.debug_pubnames) }
202 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
203 .debug_abbrev 0 : { *(.debug_abbrev) }
204 .debug_line 0 : { *(.debug_line) }
205 .debug_frame 0 : { *(.debug_frame) }
206 .debug_str 0 : { *(.debug_str) }
207 .debug_loc 0 : { *(.debug_loc) }
208 .debug_macinfo 0 : { *(.debug_macinfo) }
209 /* SGI/MIPS DWARF 2 extensions */
210 .debug_weaknames 0 : { *(.debug_weaknames) }
211 .debug_funcnames 0 : { *(.debug_funcnames) }
212 .debug_typenames 0 : { *(.debug_typenames) }
213 .debug_varnames 0 : { *(.debug_varnames) }
214 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
215 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
216 /DISCARD/ : { *(.note.GNU-stack) }