1 /* Script for -z combreloc -z now -z relro: combine and sort reloc sections */
2 OUTPUT_FORMAT("elf32-ntradlittlemips", "elf32-ntradbigmips",
3 "elf32-ntradlittlemips")
6 SEARCH_DIR("/opt/brcm/hndtools-mipsel-uclibc-4.1.2/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 = 0x10000000); . = 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.*)
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.*)
60 .rel.plt : { *(.rel.plt) }
61 .rela.plt : { *(.rela.plt) }
70 *(.text .stub .text.* .gnu.linkonce.t.*)
71 /* .gnu.warning sections are handled specially by elf32.em. */
73 *(.mips16.fn.*) *(.mips16.call.*)
79 PROVIDE (__etext = .);
82 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
83 .rodata1 : { *(.rodata1) }
86 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
88 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
89 .eh_frame_hdr : { *(.eh_frame_hdr) }
90 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
91 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
92 /* Adjust the address for the data segment. We want to adjust up to
93 the same address within the page on the next page up. */
94 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
95 /* Exception handling */
96 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
97 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
98 /* Thread Local Storage sections */
99 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
100 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
103 PROVIDE_HIDDEN (__preinit_array_start = .);
104 KEEP (*(.preinit_array))
105 PROVIDE_HIDDEN (__preinit_array_end = .);
109 PROVIDE_HIDDEN (__init_array_start = .);
110 KEEP (*(SORT(.init_array.*)))
111 KEEP (*(.init_array))
112 PROVIDE_HIDDEN (__init_array_end = .);
116 PROVIDE_HIDDEN (__fini_array_start = .);
117 KEEP (*(.fini_array))
118 KEEP (*(SORT(.fini_array.*)))
119 PROVIDE_HIDDEN (__fini_array_end = .);
123 /* gcc uses crtbegin.o to find the start of
124 the constructors, so we make sure it is
125 first. Because this is a wildcard, it
126 doesn't matter if the user does not
127 actually link against crtbegin.o; the
128 linker won't look for a file to match a
129 wildcard. The wildcard also means that it
130 doesn't matter which directory crtbegin.o
132 KEEP (*crtbegin.o(.ctors))
133 KEEP (*crtbegin?.o(.ctors))
134 /* We don't want to include the .ctor section from
135 the crtend.o file until after the sorted ctors.
136 The .ctor section from the crtend file contains the
137 end of ctors marker and it must be last */
138 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
139 KEEP (*(SORT(.ctors.*)))
144 KEEP (*crtbegin.o(.dtors))
145 KEEP (*crtbegin?.o(.dtors))
146 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
147 KEEP (*(SORT(.dtors.*)))
150 .jcr : { KEEP (*(.jcr)) }
151 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
152 .got.plt : { *(.got.plt) }
153 . = DATA_SEGMENT_RELRO_END (0, .);
157 *(.data .data.* .gnu.linkonce.d.*)
160 .data1 : { *(.data1) }
162 _gp = ALIGN(16) + 0x7ff0;
164 /* We want the small data sections together, so single-instruction offsets
165 can access them all, and initialized data all before uninitialized, so
166 we can shorten the on-disk segment size. */
169 *(.sdata .sdata.* .gnu.linkonce.s.*)
173 .srdata : { *(.srdata) }
174 _edata = .; PROVIDE (edata = .);
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 ? 32 / 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) }