1 /* Script for -z combreloc: combine and sort reloc sections */
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 PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x120000000)); . = SEGMENT_START("text-segment", 0x120000000) + 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.*)
40 PROVIDE_HIDDEN (__rel_iplt_start = .);
42 PROVIDE_HIDDEN (__rel_iplt_end = .);
43 PROVIDE_HIDDEN (__rela_iplt_start = .);
44 PROVIDE_HIDDEN (__rela_iplt_end = .);
49 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
51 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
52 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
53 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
54 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
58 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
59 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
60 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
61 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
62 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
63 PROVIDE_HIDDEN (__rel_iplt_start = .);
64 PROVIDE_HIDDEN (__rel_iplt_end = .);
65 PROVIDE_HIDDEN (__rela_iplt_start = .);
67 PROVIDE_HIDDEN (__rela_iplt_end = .);
86 *(.text.unlikely .text.*_unlikely)
87 *(.text .stub .text.* .gnu.linkonce.t.*)
88 /* .gnu.warning sections are handled specially by elf32.em. */
90 *(.mips16.fn.*) *(.mips16.call.*)
96 PROVIDE (__etext = .);
99 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
100 .rodata1 : { *(.rodata1) }
103 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
105 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
106 .eh_frame_hdr : { *(.eh_frame_hdr) }
107 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
108 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
109 /* Adjust the address for the data segment. We want to adjust up to
110 the same address within the page on the next page up. */
111 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
112 /* Exception handling */
113 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
114 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
115 /* Thread Local Storage sections */
116 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
117 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
120 PROVIDE_HIDDEN (__preinit_array_start = .);
121 KEEP (*(.preinit_array))
122 PROVIDE_HIDDEN (__preinit_array_end = .);
126 PROVIDE_HIDDEN (__init_array_start = .);
127 KEEP (*(SORT(.init_array.*)))
128 KEEP (*(.init_array))
129 PROVIDE_HIDDEN (__init_array_end = .);
133 PROVIDE_HIDDEN (__fini_array_start = .);
134 KEEP (*(.fini_array))
135 KEEP (*(SORT(.fini_array.*)))
136 PROVIDE_HIDDEN (__fini_array_end = .);
140 /* gcc uses crtbegin.o to find the start of
141 the constructors, so we make sure it is
142 first. Because this is a wildcard, it
143 doesn't matter if the user does not
144 actually link against crtbegin.o; the
145 linker won't look for a file to match a
146 wildcard. The wildcard also means that it
147 doesn't matter which directory crtbegin.o
149 KEEP (*crtbegin.o(.ctors))
150 KEEP (*crtbegin?.o(.ctors))
151 /* We don't want to include the .ctor section from
152 the crtend.o file until after the sorted ctors.
153 The .ctor section from the crtend file contains the
154 end of ctors marker and it must be last */
155 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
156 KEEP (*(SORT(.ctors.*)))
161 KEEP (*crtbegin.o(.dtors))
162 KEEP (*crtbegin?.o(.dtors))
163 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
164 KEEP (*(SORT(.dtors.*)))
167 .jcr : { KEEP (*(.jcr)) }
168 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
169 . = DATA_SEGMENT_RELRO_END (0, .);
173 *(.data .data.* .gnu.linkonce.d.*)
176 .data1 : { *(.data1) }
177 .got.plt : { *(.got.plt) }
179 _gp = ALIGN(16) + 0x7ff0;
181 /* We want the small data sections together, so single-instruction offsets
182 can access them all, and initialized data all before uninitialized, so
183 we can shorten the on-disk segment size. */
186 *(.sdata .sdata.* .gnu.linkonce.s.*)
190 .srdata : { *(.srdata) }
191 _edata = .; PROVIDE (edata = .);
197 *(.sbss .sbss.* .gnu.linkonce.sb.*)
203 *(.bss .bss.* .gnu.linkonce.b.*)
205 /* Align here to ensure that the .bss section occupies space up to
206 _end. Align after .bss to ensure correct alignment even if the
207 .bss section disappears because there are no input sections.
208 FIXME: Why do we need it? When there is no .bss section, we don't
209 pad the .data section. */
210 . = ALIGN(. != 0 ? 64 / 8 : 1);
214 _end = .; PROVIDE (end = .);
215 . = DATA_SEGMENT_END (.);
216 /* Stabs debugging sections. */
217 .stab 0 : { *(.stab) }
218 .stabstr 0 : { *(.stabstr) }
219 .stab.excl 0 : { *(.stab.excl) }
220 .stab.exclstr 0 : { *(.stab.exclstr) }
221 .stab.index 0 : { *(.stab.index) }
222 .stab.indexstr 0 : { *(.stab.indexstr) }
223 .comment 0 : { *(.comment) }
224 /* DWARF debug sections.
225 Symbols in the DWARF debugging sections are relative to the beginning
226 of the section so we begin them at 0. */
228 .debug 0 : { *(.debug) }
229 .line 0 : { *(.line) }
230 /* GNU DWARF 1 extensions */
231 .debug_srcinfo 0 : { *(.debug_srcinfo) }
232 .debug_sfnames 0 : { *(.debug_sfnames) }
233 /* DWARF 1.1 and DWARF 2 */
234 .debug_aranges 0 : { *(.debug_aranges) }
235 .debug_pubnames 0 : { *(.debug_pubnames) }
237 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
238 .debug_abbrev 0 : { *(.debug_abbrev) }
239 .debug_line 0 : { *(.debug_line) }
240 .debug_frame 0 : { *(.debug_frame) }
241 .debug_str 0 : { *(.debug_str) }
242 .debug_loc 0 : { *(.debug_loc) }
243 .debug_macinfo 0 : { *(.debug_macinfo) }
244 /* SGI/MIPS DWARF 2 extensions */
245 .debug_weaknames 0 : { *(.debug_weaknames) }
246 .debug_funcnames 0 : { *(.debug_funcnames) }
247 .debug_typenames 0 : { *(.debug_typenames) }
248 .debug_varnames 0 : { *(.debug_varnames) }
250 .debug_pubtypes 0 : { *(.debug_pubtypes) }
251 .debug_ranges 0 : { *(.debug_ranges) }
252 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
253 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
254 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
255 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }