1 /* Script for --shared -z combreloc: shared library, combine & sort relocs */
2 OUTPUT_FORMAT("elf32-tradlittlemips", "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 . = 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.*)
44 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
46 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
47 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
48 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
49 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
53 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
54 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
55 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
56 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
57 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
59 .rel.plt : { *(.rel.plt) }
60 .rela.plt : { *(.rela.plt) }
69 *(.text .stub .text.* .gnu.linkonce.t.*)
70 /* .gnu.warning sections are handled specially by elf32.em. */
72 *(.mips16.fn.*) *(.mips16.call.*)
78 PROVIDE (__etext = .);
81 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
82 .rodata1 : { *(.rodata1) }
83 .eh_frame_hdr : { *(.eh_frame_hdr) }
84 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
85 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
86 /* Adjust the address for the data segment. We want to adjust up to
87 the same address within the page on the next page up. */
88 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
89 /* Exception handling */
90 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
91 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
92 /* Thread Local Storage sections */
93 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
94 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
97 KEEP (*(.preinit_array))
101 KEEP (*(SORT(.init_array.*)))
102 KEEP (*(.init_array))
106 KEEP (*(.fini_array))
107 KEEP (*(SORT(.fini_array.*)))
111 /* gcc uses crtbegin.o to find the start of
112 the constructors, so we make sure it is
113 first. Because this is a wildcard, it
114 doesn't matter if the user does not
115 actually link against crtbegin.o; the
116 linker won't look for a file to match a
117 wildcard. The wildcard also means that it
118 doesn't matter which directory crtbegin.o
120 KEEP (*crtbegin.o(.ctors))
121 KEEP (*crtbegin?.o(.ctors))
122 /* We don't want to include the .ctor section from
123 the crtend.o file until after the sorted ctors.
124 The .ctor section from the crtend file contains the
125 end of ctors marker and it must be last */
126 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
127 KEEP (*(SORT(.ctors.*)))
132 KEEP (*crtbegin.o(.dtors))
133 KEEP (*crtbegin?.o(.dtors))
134 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
135 KEEP (*(SORT(.dtors.*)))
138 .jcr : { KEEP (*(.jcr)) }
139 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
140 . = DATA_SEGMENT_RELRO_END (0, .);
144 *(.data .data.* .gnu.linkonce.d.*)
147 .data1 : { *(.data1) }
148 .got.plt : { *(.got.plt) }
150 _gp = ALIGN(16) + 0x7ff0;
152 /* We want the small data sections together, so single-instruction offsets
153 can access them all, and initialized data all before uninitialized, so
154 we can shorten the on-disk segment size. */
157 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
158 *(.sdata .sdata.* .gnu.linkonce.s.*)
162 _edata = .; PROVIDE (edata = .);
167 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
169 *(.sbss .sbss.* .gnu.linkonce.sb.*)
175 *(.bss .bss.* .gnu.linkonce.b.*)
177 /* Align here to ensure that the .bss section occupies space up to
178 _end. Align after .bss to ensure correct alignment even if the
179 .bss section disappears because there are no input sections.
180 FIXME: Why do we need it? When there is no .bss section, we don't
181 pad the .data section. */
182 . = ALIGN(. != 0 ? 32 / 8 : 1);
186 _end = .; PROVIDE (end = .);
187 . = DATA_SEGMENT_END (.);
188 /* Stabs debugging sections. */
189 .stab 0 : { *(.stab) }
190 .stabstr 0 : { *(.stabstr) }
191 .stab.excl 0 : { *(.stab.excl) }
192 .stab.exclstr 0 : { *(.stab.exclstr) }
193 .stab.index 0 : { *(.stab.index) }
194 .stab.indexstr 0 : { *(.stab.indexstr) }
195 .comment 0 : { *(.comment) }
196 /* DWARF debug sections.
197 Symbols in the DWARF debugging sections are relative to the beginning
198 of the section so we begin them at 0. */
200 .debug 0 : { *(.debug) }
201 .line 0 : { *(.line) }
202 /* GNU DWARF 1 extensions */
203 .debug_srcinfo 0 : { *(.debug_srcinfo) }
204 .debug_sfnames 0 : { *(.debug_sfnames) }
205 /* DWARF 1.1 and DWARF 2 */
206 .debug_aranges 0 : { *(.debug_aranges) }
207 .debug_pubnames 0 : { *(.debug_pubnames) }
209 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
210 .debug_abbrev 0 : { *(.debug_abbrev) }
211 .debug_line 0 : { *(.debug_line) }
212 .debug_frame 0 : { *(.debug_frame) }
213 .debug_str 0 : { *(.debug_str) }
214 .debug_loc 0 : { *(.debug_loc) }
215 .debug_macinfo 0 : { *(.debug_macinfo) }
216 /* SGI/MIPS DWARF 2 extensions */
217 .debug_weaknames 0 : { *(.debug_weaknames) }
218 .debug_funcnames 0 : { *(.debug_funcnames) }
219 .debug_typenames 0 : { *(.debug_typenames) }
220 .debug_varnames 0 : { *(.debug_varnames) }
222 .debug_pubtypes 0 : { *(.debug_pubtypes) }
223 .debug_ranges 0 : { *(.debug_ranges) }
224 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
225 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
226 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
227 .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
228 .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
229 .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
230 .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
231 .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
232 .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
233 .gcc_compiled_long32 : { KEEP(*(.gcc_compiled_long32)) }
234 .gcc_compiled_long64 : { KEEP(*(.gcc_compiled_long64)) }
235 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }