1 /* Script for -z combreloc -z now -z relro: combine and sort reloc sections */
2 OUTPUT_FORMAT("elf32-ntradbigmips", "elf32-ntradbigmips",
3 "elf32-ntradlittlemips")
6 SEARCH_DIR("/opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib32"); SEARCH_DIR("=/usr/local/lib32"); SEARCH_DIR("=/lib32"); SEARCH_DIR("=/usr/lib32"); 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", 0x10000000)); . = SEGMENT_START("text-segment", 0x10000000) + SIZEOF_HEADERS;
11 .interp : { *(.interp) }
12 .reginfo : { *(.reginfo) }
13 .note.gnu.build-id : { *(.note.gnu.build-id) }
14 .dynamic : { *(.dynamic) }
16 .gnu.hash : { *(.gnu.hash) }
17 .dynsym : { *(.dynsym) }
18 .dynstr : { *(.dynstr) }
19 .gnu.version : { *(.gnu.version) }
20 .gnu.version_d : { *(.gnu.version_d) }
21 .gnu.version_r : { *(.gnu.version_r) }
25 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
27 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
28 *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
29 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
30 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
31 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
36 *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
37 *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
38 *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
39 *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
40 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
41 PROVIDE_HIDDEN (__rel_iplt_start = .);
43 PROVIDE_HIDDEN (__rel_iplt_end = .);
44 PROVIDE_HIDDEN (__rela_iplt_start = .);
45 PROVIDE_HIDDEN (__rela_iplt_end = .);
50 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
52 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
53 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
54 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
55 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
59 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
60 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
61 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
62 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
63 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
64 PROVIDE_HIDDEN (__rel_iplt_start = .);
65 PROVIDE_HIDDEN (__rel_iplt_end = .);
66 PROVIDE_HIDDEN (__rela_iplt_start = .);
68 PROVIDE_HIDDEN (__rela_iplt_end = .);
87 *(.text.unlikely .text.*_unlikely)
88 *(.text .stub .text.* .gnu.linkonce.t.*)
89 /* .gnu.warning sections are handled specially by elf32.em. */
91 *(.mips16.fn.*) *(.mips16.call.*)
97 PROVIDE (__etext = .);
100 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
101 .rodata1 : { *(.rodata1) }
104 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
106 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
107 .eh_frame_hdr : { *(.eh_frame_hdr) }
108 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
109 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
110 /* Adjust the address for the data segment. We want to adjust up to
111 the same address within the page on the next page up. */
112 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
113 /* Exception handling */
114 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
115 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
116 /* Thread Local Storage sections */
117 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
118 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
121 PROVIDE_HIDDEN (__preinit_array_start = .);
122 KEEP (*(.preinit_array))
123 PROVIDE_HIDDEN (__preinit_array_end = .);
127 PROVIDE_HIDDEN (__init_array_start = .);
128 KEEP (*(SORT(.init_array.*)))
129 KEEP (*(.init_array))
130 PROVIDE_HIDDEN (__init_array_end = .);
134 PROVIDE_HIDDEN (__fini_array_start = .);
135 KEEP (*(.fini_array))
136 KEEP (*(SORT(.fini_array.*)))
137 PROVIDE_HIDDEN (__fini_array_end = .);
141 /* gcc uses crtbegin.o to find the start of
142 the constructors, so we make sure it is
143 first. Because this is a wildcard, it
144 doesn't matter if the user does not
145 actually link against crtbegin.o; the
146 linker won't look for a file to match a
147 wildcard. The wildcard also means that it
148 doesn't matter which directory crtbegin.o
150 KEEP (*crtbegin.o(.ctors))
151 KEEP (*crtbegin?.o(.ctors))
152 /* We don't want to include the .ctor section from
153 the crtend.o file until after the sorted ctors.
154 The .ctor section from the crtend file contains the
155 end of ctors marker and it must be last */
156 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
157 KEEP (*(SORT(.ctors.*)))
162 KEEP (*crtbegin.o(.dtors))
163 KEEP (*crtbegin?.o(.dtors))
164 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
165 KEEP (*(SORT(.dtors.*)))
168 .jcr : { KEEP (*(.jcr)) }
169 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
170 .got.plt : { *(.got.plt) }
171 . = DATA_SEGMENT_RELRO_END (0, .);
175 *(.data .data.* .gnu.linkonce.d.*)
178 .data1 : { *(.data1) }
180 _gp = ALIGN(16) + 0x7ff0;
182 /* We want the small data sections together, so single-instruction offsets
183 can access them all, and initialized data all before uninitialized, so
184 we can shorten the on-disk segment size. */
187 *(.sdata .sdata.* .gnu.linkonce.s.*)
191 .srdata : { *(.srdata) }
192 _edata = .; PROVIDE (edata = .);
198 *(.sbss .sbss.* .gnu.linkonce.sb.*)
204 *(.bss .bss.* .gnu.linkonce.b.*)
206 /* Align here to ensure that the .bss section occupies space up to
207 _end. Align after .bss to ensure correct alignment even if the
208 .bss section disappears because there are no input sections.
209 FIXME: Why do we need it? When there is no .bss section, we don't
210 pad the .data section. */
211 . = ALIGN(. != 0 ? 32 / 8 : 1);
215 _end = .; PROVIDE (end = .);
216 . = DATA_SEGMENT_END (.);
217 /* Stabs debugging sections. */
218 .stab 0 : { *(.stab) }
219 .stabstr 0 : { *(.stabstr) }
220 .stab.excl 0 : { *(.stab.excl) }
221 .stab.exclstr 0 : { *(.stab.exclstr) }
222 .stab.index 0 : { *(.stab.index) }
223 .stab.indexstr 0 : { *(.stab.indexstr) }
224 .comment 0 : { *(.comment) }
225 /* DWARF debug sections.
226 Symbols in the DWARF debugging sections are relative to the beginning
227 of the section so we begin them at 0. */
229 .debug 0 : { *(.debug) }
230 .line 0 : { *(.line) }
231 /* GNU DWARF 1 extensions */
232 .debug_srcinfo 0 : { *(.debug_srcinfo) }
233 .debug_sfnames 0 : { *(.debug_sfnames) }
234 /* DWARF 1.1 and DWARF 2 */
235 .debug_aranges 0 : { *(.debug_aranges) }
236 .debug_pubnames 0 : { *(.debug_pubnames) }
238 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
239 .debug_abbrev 0 : { *(.debug_abbrev) }
240 .debug_line 0 : { *(.debug_line) }
241 .debug_frame 0 : { *(.debug_frame) }
242 .debug_str 0 : { *(.debug_str) }
243 .debug_loc 0 : { *(.debug_loc) }
244 .debug_macinfo 0 : { *(.debug_macinfo) }
245 /* SGI/MIPS DWARF 2 extensions */
246 .debug_weaknames 0 : { *(.debug_weaknames) }
247 .debug_funcnames 0 : { *(.debug_funcnames) }
248 .debug_typenames 0 : { *(.debug_typenames) }
249 .debug_varnames 0 : { *(.debug_varnames) }
251 .debug_pubtypes 0 : { *(.debug_pubtypes) }
252 .debug_ranges 0 : { *(.debug_ranges) }
253 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
254 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
255 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
256 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }