1 /* Script for ld --shared: link shared library */
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) }
21 .rel.init : { *(.rel.init) }
22 .rela.init : { *(.rela.init) }
23 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
24 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
25 .rel.fini : { *(.rel.fini) }
26 .rela.fini : { *(.rela.fini) }
27 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
28 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
29 .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
30 .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
31 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
32 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
33 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
34 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
35 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
36 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
37 .rel.ctors : { *(.rel.ctors) }
38 .rela.ctors : { *(.rela.ctors) }
39 .rel.dtors : { *(.rel.dtors) }
40 .rela.dtors : { *(.rela.dtors) }
41 .rel.got : { *(.rel.got) }
42 .rela.got : { *(.rela.got) }
43 .rel.dyn : { *(.rel.dyn) }
44 .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
45 .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
46 .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
47 .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
48 .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
49 .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
50 .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
51 .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
52 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
53 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
79 *(.text.unlikely .text.*_unlikely)
80 *(.text .stub .text.* .gnu.linkonce.t.*)
81 /* .gnu.warning sections are handled specially by elf32.em. */
83 *(.mips16.fn.*) *(.mips16.call.*)
89 PROVIDE (__etext = .);
92 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
93 .rodata1 : { *(.rodata1) }
94 .eh_frame_hdr : { *(.eh_frame_hdr) }
95 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
96 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
97 /* Adjust the address for the data segment. We want to adjust up to
98 the same address within the page on the next page up. */
99 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
100 /* Exception handling */
101 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
102 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
103 /* Thread Local Storage sections */
104 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
105 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
108 KEEP (*(.preinit_array))
112 KEEP (*(SORT(.init_array.*)))
113 KEEP (*(.init_array))
117 KEEP (*(.fini_array))
118 KEEP (*(SORT(.fini_array.*)))
122 /* gcc uses crtbegin.o to find the start of
123 the constructors, so we make sure it is
124 first. Because this is a wildcard, it
125 doesn't matter if the user does not
126 actually link against crtbegin.o; the
127 linker won't look for a file to match a
128 wildcard. The wildcard also means that it
129 doesn't matter which directory crtbegin.o
131 KEEP (*crtbegin.o(.ctors))
132 KEEP (*crtbegin?.o(.ctors))
133 /* We don't want to include the .ctor section from
134 the crtend.o file until after the sorted ctors.
135 The .ctor section from the crtend file contains the
136 end of ctors marker and it must be last */
137 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
138 KEEP (*(SORT(.ctors.*)))
143 KEEP (*crtbegin.o(.dtors))
144 KEEP (*crtbegin?.o(.dtors))
145 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
146 KEEP (*(SORT(.dtors.*)))
149 .jcr : { KEEP (*(.jcr)) }
150 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
151 . = DATA_SEGMENT_RELRO_END (0, .);
155 *(.data .data.* .gnu.linkonce.d.*)
158 .data1 : { *(.data1) }
159 .got.plt : { *(.got.plt) }
161 _gp = ALIGN(16) + 0x7ff0;
163 /* We want the small data sections together, so single-instruction offsets
164 can access them all, and initialized data all before uninitialized, so
165 we can shorten the on-disk segment size. */
168 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
169 *(.sdata .sdata.* .gnu.linkonce.s.*)
173 .srdata : { *(.srdata) }
174 _edata = .; PROVIDE (edata = .);
179 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
181 *(.sbss .sbss.* .gnu.linkonce.sb.*)
187 *(.bss .bss.* .gnu.linkonce.b.*)
189 /* Align here to ensure that the .bss section occupies space up to
190 _end. Align after .bss to ensure correct alignment even if the
191 .bss section disappears because there are no input sections.
192 FIXME: Why do we need it? When there is no .bss section, we don't
193 pad the .data section. */
194 . = ALIGN(. != 0 ? 64 / 8 : 1);
198 _end = .; PROVIDE (end = .);
199 . = DATA_SEGMENT_END (.);
200 /* Stabs debugging sections. */
201 .stab 0 : { *(.stab) }
202 .stabstr 0 : { *(.stabstr) }
203 .stab.excl 0 : { *(.stab.excl) }
204 .stab.exclstr 0 : { *(.stab.exclstr) }
205 .stab.index 0 : { *(.stab.index) }
206 .stab.indexstr 0 : { *(.stab.indexstr) }
207 .comment 0 : { *(.comment) }
208 /* DWARF debug sections.
209 Symbols in the DWARF debugging sections are relative to the beginning
210 of the section so we begin them at 0. */
212 .debug 0 : { *(.debug) }
213 .line 0 : { *(.line) }
214 /* GNU DWARF 1 extensions */
215 .debug_srcinfo 0 : { *(.debug_srcinfo) }
216 .debug_sfnames 0 : { *(.debug_sfnames) }
217 /* DWARF 1.1 and DWARF 2 */
218 .debug_aranges 0 : { *(.debug_aranges) }
219 .debug_pubnames 0 : { *(.debug_pubnames) }
221 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
222 .debug_abbrev 0 : { *(.debug_abbrev) }
223 .debug_line 0 : { *(.debug_line) }
224 .debug_frame 0 : { *(.debug_frame) }
225 .debug_str 0 : { *(.debug_str) }
226 .debug_loc 0 : { *(.debug_loc) }
227 .debug_macinfo 0 : { *(.debug_macinfo) }
228 /* SGI/MIPS DWARF 2 extensions */
229 .debug_weaknames 0 : { *(.debug_weaknames) }
230 .debug_funcnames 0 : { *(.debug_funcnames) }
231 .debug_typenames 0 : { *(.debug_typenames) }
232 .debug_varnames 0 : { *(.debug_varnames) }
234 .debug_pubtypes 0 : { *(.debug_pubtypes) }
235 .debug_ranges 0 : { *(.debug_ranges) }
236 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
237 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
238 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
239 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }