1 /* Script for --shared -z combreloc: shared library, combine & sort relocs */
2 OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips",
3 "elf32-tradlittlemips")
6 SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
9 /* Read-only sections, merged into text segment: */
10 . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;
11 .reginfo : { *(.reginfo) }
12 .note.gnu.build-id : { *(.note.gnu.build-id) }
13 .dynamic : { *(.dynamic) }
15 .gnu.hash : { *(.gnu.hash) }
16 .dynsym : { *(.dynsym) }
17 .dynstr : { *(.dynstr) }
18 .gnu.version : { *(.gnu.version) }
19 .gnu.version_d : { *(.gnu.version_d) }
20 .gnu.version_r : { *(.gnu.version_r) }
24 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
26 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
27 *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
28 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
29 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
30 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
35 *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
36 *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
37 *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
38 *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
39 *(.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.*)
78 *(.text.unlikely .text.*_unlikely)
79 *(.text .stub .text.* .gnu.linkonce.t.*)
80 /* .gnu.warning sections are handled specially by elf32.em. */
82 *(.mips16.fn.*) *(.mips16.call.*)
88 PROVIDE (__etext = .);
91 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
92 .rodata1 : { *(.rodata1) }
93 .eh_frame_hdr : { *(.eh_frame_hdr) }
94 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
95 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
96 /* Adjust the address for the data segment. We want to adjust up to
97 the same address within the page on the next page up. */
98 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
99 /* Exception handling */
100 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
101 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
102 /* Thread Local Storage sections */
103 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
104 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
107 KEEP (*(.preinit_array))
111 KEEP (*(SORT(.init_array.*)))
112 KEEP (*(.init_array))
116 KEEP (*(.fini_array))
117 KEEP (*(SORT(.fini_array.*)))
121 /* gcc uses crtbegin.o to find the start of
122 the constructors, so we make sure it is
123 first. Because this is a wildcard, it
124 doesn't matter if the user does not
125 actually link against crtbegin.o; the
126 linker won't look for a file to match a
127 wildcard. The wildcard also means that it
128 doesn't matter which directory crtbegin.o
130 KEEP (*crtbegin.o(.ctors))
131 KEEP (*crtbegin?.o(.ctors))
132 /* We don't want to include the .ctor section from
133 the crtend.o file until after the sorted ctors.
134 The .ctor section from the crtend file contains the
135 end of ctors marker and it must be last */
136 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
137 KEEP (*(SORT(.ctors.*)))
142 KEEP (*crtbegin.o(.dtors))
143 KEEP (*crtbegin?.o(.dtors))
144 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
145 KEEP (*(SORT(.dtors.*)))
148 .jcr : { KEEP (*(.jcr)) }
149 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
150 . = DATA_SEGMENT_RELRO_END (0, .);
154 *(.data .data.* .gnu.linkonce.d.*)
157 .data1 : { *(.data1) }
158 .got.plt : { *(.got.plt) }
160 _gp = ALIGN(16) + 0x7ff0;
162 /* We want the small data sections together, so single-instruction offsets
163 can access them all, and initialized data all before uninitialized, so
164 we can shorten the on-disk segment size. */
167 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
168 *(.sdata .sdata.* .gnu.linkonce.s.*)
172 _edata = .; PROVIDE (edata = .);
177 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
179 *(.sbss .sbss.* .gnu.linkonce.sb.*)
185 *(.bss .bss.* .gnu.linkonce.b.*)
187 /* Align here to ensure that the .bss section occupies space up to
188 _end. Align after .bss to ensure correct alignment even if the
189 .bss section disappears because there are no input sections.
190 FIXME: Why do we need it? When there is no .bss section, we don't
191 pad the .data section. */
192 . = ALIGN(. != 0 ? 32 / 8 : 1);
196 _end = .; PROVIDE (end = .);
197 . = DATA_SEGMENT_END (.);
198 /* Stabs debugging sections. */
199 .stab 0 : { *(.stab) }
200 .stabstr 0 : { *(.stabstr) }
201 .stab.excl 0 : { *(.stab.excl) }
202 .stab.exclstr 0 : { *(.stab.exclstr) }
203 .stab.index 0 : { *(.stab.index) }
204 .stab.indexstr 0 : { *(.stab.indexstr) }
205 .comment 0 : { *(.comment) }
206 /* DWARF debug sections.
207 Symbols in the DWARF debugging sections are relative to the beginning
208 of the section so we begin them at 0. */
210 .debug 0 : { *(.debug) }
211 .line 0 : { *(.line) }
212 /* GNU DWARF 1 extensions */
213 .debug_srcinfo 0 : { *(.debug_srcinfo) }
214 .debug_sfnames 0 : { *(.debug_sfnames) }
215 /* DWARF 1.1 and DWARF 2 */
216 .debug_aranges 0 : { *(.debug_aranges) }
217 .debug_pubnames 0 : { *(.debug_pubnames) }
219 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
220 .debug_abbrev 0 : { *(.debug_abbrev) }
221 .debug_line 0 : { *(.debug_line) }
222 .debug_frame 0 : { *(.debug_frame) }
223 .debug_str 0 : { *(.debug_str) }
224 .debug_loc 0 : { *(.debug_loc) }
225 .debug_macinfo 0 : { *(.debug_macinfo) }
226 /* SGI/MIPS DWARF 2 extensions */
227 .debug_weaknames 0 : { *(.debug_weaknames) }
228 .debug_funcnames 0 : { *(.debug_funcnames) }
229 .debug_typenames 0 : { *(.debug_typenames) }
230 .debug_varnames 0 : { *(.debug_varnames) }
232 .debug_pubtypes 0 : { *(.debug_pubtypes) }
233 .debug_ranges 0 : { *(.debug_ranges) }
234 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
235 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
236 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
237 .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
238 .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
239 .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
240 .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
241 .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
242 .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
243 .gcc_compiled_long32 : { KEEP(*(.gcc_compiled_long32)) }
244 .gcc_compiled_long64 : { KEEP(*(.gcc_compiled_long64)) }
245 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }