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");
7 /* Do we need any of these for elf?
11 /* Read-only sections, merged into text segment: */
12 . = 0 + SIZEOF_HEADERS;
13 .reginfo : { *(.reginfo) }
14 .dynamic : { *(.dynamic) }
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.*)
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.*)
34 *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
35 *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
36 *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
37 *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
38 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
43 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
45 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
46 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
47 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
48 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
52 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
53 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
54 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
55 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
56 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
58 .rel.plt : { *(.rel.plt) }
59 .rela.plt : { *(.rela.plt) }
68 *(.text .stub .text.* .gnu.linkonce.t.*)
69 KEEP (*(.text.*personality*))
70 /* .gnu.warning sections are handled specially by elf.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 { KEEP (*(.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 (0x40000) - ((0x40000 - .) & (0x40000 - 1)); . = DATA_SEGMENT_ALIGN (0x40000, 0x1000);
89 /* Exception handling */
90 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
91 .gcc_except_table : ONLY_IF_RW { KEEP (*(.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) }
95 /* Ensure the __preinit_array_start label is properly aligned. We
96 could instead move the label definition inside the section, but
97 the linker would then create the section even if it turns out to
98 be empty, which isn't pretty. */
100 .preinit_array : { KEEP (*(.preinit_array)) }
101 .init_array : { KEEP (*(.init_array)) }
102 .fini_array : { KEEP (*(.fini_array)) }
105 /* gcc uses crtbegin.o to find the start of
106 the constructors, so we make sure it is
107 first. Because this is a wildcard, it
108 doesn't matter if the user does not
109 actually link against crtbegin.o; the
110 linker won't look for a file to match a
111 wildcard. The wildcard also means that it
112 doesn't matter which directory crtbegin.o
114 KEEP (*crtbegin*.o(.ctors))
115 /* We don't want to include the .ctor section from
116 from the crtend.o file until after the sorted ctors.
117 The .ctor section from the crtend file contains the
118 end of ctors marker and it must be last */
119 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
120 KEEP (*(SORT(.ctors.*)))
125 KEEP (*crtbegin*.o(.dtors))
126 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
127 KEEP (*(SORT(.dtors.*)))
130 .jcr : { KEEP (*(.jcr)) }
131 .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
132 . = DATA_SEGMENT_RELRO_END (0, .);
136 *(.data .data.* .gnu.linkonce.d.*)
137 KEEP (*(.gnu.linkonce.d.*personality*))
140 .data1 : { *(.data1) }
141 HIDDEN (_gp = ALIGN(16) + 0x7ff0);
142 .got : { *(.got.plt) *(.got) }
143 .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
144 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
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. */
176 . = ALIGN(. != 0 ? 32 / 8 : 1);
181 . = DATA_SEGMENT_END (.);
182 /* Stabs debugging sections. */
183 .stab 0 : { *(.stab) }
184 .stabstr 0 : { *(.stabstr) }
185 .stab.excl 0 : { *(.stab.excl) }
186 .stab.exclstr 0 : { *(.stab.exclstr) }
187 .stab.index 0 : { *(.stab.index) }
188 .stab.indexstr 0 : { *(.stab.indexstr) }
189 .comment 0 : { *(.comment) }
190 /* DWARF debug sections.
191 Symbols in the DWARF debugging sections are relative to the beginning
192 of the section so we begin them at 0. */
194 .debug 0 : { *(.debug) }
195 .line 0 : { *(.line) }
196 /* GNU DWARF 1 extensions */
197 .debug_srcinfo 0 : { *(.debug_srcinfo) }
198 .debug_sfnames 0 : { *(.debug_sfnames) }
199 /* DWARF 1.1 and DWARF 2 */
200 .debug_aranges 0 : { *(.debug_aranges) }
201 .debug_pubnames 0 : { *(.debug_pubnames) }
203 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
204 .debug_abbrev 0 : { *(.debug_abbrev) }
205 .debug_line 0 : { *(.debug_line) }
206 .debug_frame 0 : { *(.debug_frame) }
207 .debug_str 0 : { *(.debug_str) }
208 .debug_loc 0 : { *(.debug_loc) }
209 .debug_macinfo 0 : { *(.debug_macinfo) }
210 /* SGI/MIPS DWARF 2 extensions */
211 .debug_weaknames 0 : { *(.debug_weaknames) }
212 .debug_funcnames 0 : { *(.debug_funcnames) }
213 .debug_typenames 0 : { *(.debug_typenames) }
214 .debug_varnames 0 : { *(.debug_varnames) }
215 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
216 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
217 /DISCARD/ : { *(.note.GNU-stack) *(.MIPS.abiflags) }