1 /* Script for --shared -z combreloc: shared library, combine & sort relocs */
2 OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradbigmips",
3 "elf64-tradlittlemips")
6 SEARCH_DIR("/opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib64"); SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); 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 .MIPS.options : { *(.MIPS.options) }
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 .srdata : { *(.srdata) }
173 _edata = .; PROVIDE (edata = .);
178 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
180 *(.sbss .sbss.* .gnu.linkonce.sb.*)
186 *(.bss .bss.* .gnu.linkonce.b.*)
188 /* Align here to ensure that the .bss section occupies space up to
189 _end. Align after .bss to ensure correct alignment even if the
190 .bss section disappears because there are no input sections.
191 FIXME: Why do we need it? When there is no .bss section, we don't
192 pad the .data section. */
193 . = ALIGN(. != 0 ? 64 / 8 : 1);
197 _end = .; PROVIDE (end = .);
198 . = DATA_SEGMENT_END (.);
199 /* Stabs debugging sections. */
200 .stab 0 : { *(.stab) }
201 .stabstr 0 : { *(.stabstr) }
202 .stab.excl 0 : { *(.stab.excl) }
203 .stab.exclstr 0 : { *(.stab.exclstr) }
204 .stab.index 0 : { *(.stab.index) }
205 .stab.indexstr 0 : { *(.stab.indexstr) }
206 .comment 0 : { *(.comment) }
207 /* DWARF debug sections.
208 Symbols in the DWARF debugging sections are relative to the beginning
209 of the section so we begin them at 0. */
211 .debug 0 : { *(.debug) }
212 .line 0 : { *(.line) }
213 /* GNU DWARF 1 extensions */
214 .debug_srcinfo 0 : { *(.debug_srcinfo) }
215 .debug_sfnames 0 : { *(.debug_sfnames) }
216 /* DWARF 1.1 and DWARF 2 */
217 .debug_aranges 0 : { *(.debug_aranges) }
218 .debug_pubnames 0 : { *(.debug_pubnames) }
220 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
221 .debug_abbrev 0 : { *(.debug_abbrev) }
222 .debug_line 0 : { *(.debug_line) }
223 .debug_frame 0 : { *(.debug_frame) }
224 .debug_str 0 : { *(.debug_str) }
225 .debug_loc 0 : { *(.debug_loc) }
226 .debug_macinfo 0 : { *(.debug_macinfo) }
227 /* SGI/MIPS DWARF 2 extensions */
228 .debug_weaknames 0 : { *(.debug_weaknames) }
229 .debug_funcnames 0 : { *(.debug_funcnames) }
230 .debug_typenames 0 : { *(.debug_typenames) }
231 .debug_varnames 0 : { *(.debug_varnames) }
233 .debug_pubtypes 0 : { *(.debug_pubtypes) }
234 .debug_ranges 0 : { *(.debug_ranges) }
235 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
236 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
237 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
238 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }