toolchain: binary K26 toolchain (binutils 2.20.1, uClibc patches, updated kernel...
[tomato.git] / tools / brcm / K26 / hndtools-mipsel-uclibc-4.2.4 / lib / ldscripts / elf64ltsmip.xsc
blob69c1ee94d6e94871ef00dd34ef137f30e51a634b
1 /* Script for --shared -z combreloc: shared library, combine & sort relocs */
2 OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradbigmips",
3               "elf64-tradlittlemips")
4 OUTPUT_ARCH(mips)
5 ENTRY(__start)
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");
7 SECTIONS
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) }
14   .hash           : { *(.hash) }
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.dyn        :
22     {
23       *(.rel.init)
24       *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
25       *(.rel.fini)
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.*)
31       *(.rel.ctors)
32       *(.rel.dtors)
33       *(.rel.got)
34       *(.rel.dyn)
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       *(.rel.iplt)
41     }
42   .rela.dyn       :
43     {
44       *(.rela.init)
45       *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
46       *(.rela.fini)
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.*)
51       *(.rela.ctors)
52       *(.rela.dtors)
53       *(.rela.got)
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.*)
59       *(.rela.iplt)
60     }
61   .rel.plt        :
62     {
63       *(.rel.plt)
64     }
65   .rela.plt       :
66     {
67       *(.rela.plt)
68     }
69   .init           :
70   {
71     KEEP (*(.init))
72   } =0
73   .plt            : { *(.plt) }
74   .iplt           : { *(.iplt) }
75   .text           :
76   {
77     _ftext = . ;
78     *(.text.unlikely .text.*_unlikely)
79     *(.text .stub .text.* .gnu.linkonce.t.*)
80     /* .gnu.warning sections are handled specially by elf32.em.  */
81     *(.gnu.warning)
82     *(.mips16.fn.*) *(.mips16.call.*)
83   } =0
84   .fini           :
85   {
86     KEEP (*(.fini))
87   } =0
88   PROVIDE (__etext = .);
89   PROVIDE (_etext = .);
90   PROVIDE (etext = .);
91   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
92   .rodata1        : { *(.rodata1) }
93   .eh_frame_hdr : { *(.eh_frame_hdr) }
94   .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
95   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
96   /* Adjust the address for the data segment.  We want to adjust up to
97      the same address within the page on the next page up.  */
98   . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
99   /* Exception handling  */
100   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
101   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
102   /* Thread Local Storage sections  */
103   .tdata          : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
104   .tbss           : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
105   .preinit_array     :
106   {
107     KEEP (*(.preinit_array))
108   }
109   .init_array     :
110   {
111      KEEP (*(SORT(.init_array.*)))
112      KEEP (*(.init_array))
113   }
114   .fini_array     :
115   {
116     KEEP (*(.fini_array))
117     KEEP (*(SORT(.fini_array.*)))
118   }
119   .ctors          :
120   {
121     /* gcc uses crtbegin.o to find the start of
122        the constructors, so we make sure it is
123        first.  Because this is a wildcard, it
124        doesn't matter if the user does not
125        actually link against crtbegin.o; the
126        linker won't look for a file to match a
127        wildcard.  The wildcard also means that it
128        doesn't matter which directory crtbegin.o
129        is in.  */
130     KEEP (*crtbegin.o(.ctors))
131     KEEP (*crtbegin?.o(.ctors))
132     /* We don't want to include the .ctor section from
133        the crtend.o file until after the sorted ctors.
134        The .ctor section from the crtend file contains the
135        end of ctors marker and it must be last */
136     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
137     KEEP (*(SORT(.ctors.*)))
138     KEEP (*(.ctors))
139   }
140   .dtors          :
141   {
142     KEEP (*crtbegin.o(.dtors))
143     KEEP (*crtbegin?.o(.dtors))
144     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
145     KEEP (*(SORT(.dtors.*)))
146     KEEP (*(.dtors))
147   }
148   .jcr            : { KEEP (*(.jcr)) }
149   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
150   . = DATA_SEGMENT_RELRO_END (0, .);
151   .data           :
152   {
153     _fdata = . ;
154     *(.data .data.* .gnu.linkonce.d.*)
155     SORT(CONSTRUCTORS)
156   }
157   .data1          : { *(.data1) }
158   .got.plt        : { *(.got.plt) }
159   . = .;
160   _gp = ALIGN(16) + 0x7ff0;
161   .got            : { *(.got) }
162   /* We want the small data sections together, so single-instruction offsets
163      can access them all, and initialized data all before uninitialized, so
164      we can shorten the on-disk segment size.  */
165   .sdata          :
166   {
167     *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
168     *(.sdata .sdata.* .gnu.linkonce.s.*)
169   }
170   .lit8           : { *(.lit8) }
171   .lit4           : { *(.lit4) }
172   .srdata         : { *(.srdata) }
173   _edata = .; PROVIDE (edata = .);
174   __bss_start = .;
175   _fbss = .;
176   .sbss           :
177   {
178     *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
179     *(.dynsbss)
180     *(.sbss .sbss.* .gnu.linkonce.sb.*)
181     *(.scommon)
182   }
183   .bss            :
184   {
185    *(.dynbss)
186    *(.bss .bss.* .gnu.linkonce.b.*)
187    *(COMMON)
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 ? 64 / 8 : 1);
194   }
195   . = ALIGN(64 / 8);
196   . = ALIGN(64 / 8);
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.  */
210   /* DWARF 1 */
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) }
219   /* DWARF 2 */
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) }
232   /* DWARF 3 */
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) *(.gnu.lto_*) }