1 /* Script for -N: mix text and data on same page; don't align data */
2 OUTPUT_FORMAT("elf64-tradbigmips", "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) }
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.*) }
56 PROVIDE_HIDDEN (__rel_iplt_start = .);
58 PROVIDE_HIDDEN (__rel_iplt_end = .);
62 PROVIDE_HIDDEN (__rela_iplt_start = .);
64 PROVIDE_HIDDEN (__rela_iplt_end = .);
83 *(.text.unlikely .text.*_unlikely)
84 *(.text .stub .text.* .gnu.linkonce.t.*)
85 /* .gnu.warning sections are handled specially by elf32.em. */
87 *(.mips16.fn.*) *(.mips16.call.*)
93 PROVIDE (__etext = .);
96 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
97 .rodata1 : { *(.rodata1) }
100 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
102 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
103 .eh_frame_hdr : { *(.eh_frame_hdr) }
104 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
105 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
106 /* Adjust the address for the data segment. We want to adjust up to
107 the same address within the page on the next page up. */
109 /* Exception handling */
110 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
111 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
112 /* Thread Local Storage sections */
113 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
114 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
117 PROVIDE_HIDDEN (__preinit_array_start = .);
118 KEEP (*(.preinit_array))
119 PROVIDE_HIDDEN (__preinit_array_end = .);
123 PROVIDE_HIDDEN (__init_array_start = .);
124 KEEP (*(SORT(.init_array.*)))
125 KEEP (*(.init_array))
126 PROVIDE_HIDDEN (__init_array_end = .);
130 PROVIDE_HIDDEN (__fini_array_start = .);
131 KEEP (*(.fini_array))
132 KEEP (*(SORT(.fini_array.*)))
133 PROVIDE_HIDDEN (__fini_array_end = .);
137 /* gcc uses crtbegin.o to find the start of
138 the constructors, so we make sure it is
139 first. Because this is a wildcard, it
140 doesn't matter if the user does not
141 actually link against crtbegin.o; the
142 linker won't look for a file to match a
143 wildcard. The wildcard also means that it
144 doesn't matter which directory crtbegin.o
146 KEEP (*crtbegin.o(.ctors))
147 KEEP (*crtbegin?.o(.ctors))
148 /* We don't want to include the .ctor section from
149 the crtend.o file until after the sorted ctors.
150 The .ctor section from the crtend file contains the
151 end of ctors marker and it must be last */
152 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
153 KEEP (*(SORT(.ctors.*)))
158 KEEP (*crtbegin.o(.dtors))
159 KEEP (*crtbegin?.o(.dtors))
160 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
161 KEEP (*(SORT(.dtors.*)))
164 .jcr : { KEEP (*(.jcr)) }
165 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
169 *(.data .data.* .gnu.linkonce.d.*)
172 .data1 : { *(.data1) }
173 .got.plt : { *(.got.plt) }
175 _gp = ALIGN(16) + 0x7ff0;
177 /* We want the small data sections together, so single-instruction offsets
178 can access them all, and initialized data all before uninitialized, so
179 we can shorten the on-disk segment size. */
182 *(.sdata .sdata.* .gnu.linkonce.s.*)
186 .srdata : { *(.srdata) }
187 _edata = .; PROVIDE (edata = .);
193 *(.sbss .sbss.* .gnu.linkonce.sb.*)
199 *(.bss .bss.* .gnu.linkonce.b.*)
201 /* Align here to ensure that the .bss section occupies space up to
202 _end. Align after .bss to ensure correct alignment even if the
203 .bss section disappears because there are no input sections.
204 FIXME: Why do we need it? When there is no .bss section, we don't
205 pad the .data section. */
206 . = ALIGN(. != 0 ? 64 / 8 : 1);
210 _end = .; PROVIDE (end = .);
211 /* Stabs debugging sections. */
212 .stab 0 : { *(.stab) }
213 .stabstr 0 : { *(.stabstr) }
214 .stab.excl 0 : { *(.stab.excl) }
215 .stab.exclstr 0 : { *(.stab.exclstr) }
216 .stab.index 0 : { *(.stab.index) }
217 .stab.indexstr 0 : { *(.stab.indexstr) }
218 .comment 0 : { *(.comment) }
219 /* DWARF debug sections.
220 Symbols in the DWARF debugging sections are relative to the beginning
221 of the section so we begin them at 0. */
223 .debug 0 : { *(.debug) }
224 .line 0 : { *(.line) }
225 /* GNU DWARF 1 extensions */
226 .debug_srcinfo 0 : { *(.debug_srcinfo) }
227 .debug_sfnames 0 : { *(.debug_sfnames) }
228 /* DWARF 1.1 and DWARF 2 */
229 .debug_aranges 0 : { *(.debug_aranges) }
230 .debug_pubnames 0 : { *(.debug_pubnames) }
232 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
233 .debug_abbrev 0 : { *(.debug_abbrev) }
234 .debug_line 0 : { *(.debug_line) }
235 .debug_frame 0 : { *(.debug_frame) }
236 .debug_str 0 : { *(.debug_str) }
237 .debug_loc 0 : { *(.debug_loc) }
238 .debug_macinfo 0 : { *(.debug_macinfo) }
239 /* SGI/MIPS DWARF 2 extensions */
240 .debug_weaknames 0 : { *(.debug_weaknames) }
241 .debug_funcnames 0 : { *(.debug_funcnames) }
242 .debug_typenames 0 : { *(.debug_typenames) }
243 .debug_varnames 0 : { *(.debug_varnames) }
245 .debug_pubtypes 0 : { *(.debug_pubtypes) }
246 .debug_ranges 0 : { *(.debug_ranges) }
247 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
248 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
249 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
250 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }