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.xs
blob99ed1f962a4363f8cc99a238db2dc2f6182be0fd
1 /* Script for ld --shared: link shared library */
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.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.*) }
54   .rel.iplt       :
55     {
56       *(.rel.iplt)
57     }
58   .rela.iplt      :
59     {
60       *(.rela.iplt)
61     }
62   .rel.plt        :
63     {
64       *(.rel.plt)
65     }
66   .rela.plt       :
67     {
68       *(.rela.plt)
69     }
70   .init           :
71   {
72     KEEP (*(.init))
73   } =0
74   .plt            : { *(.plt) }
75   .iplt           : { *(.iplt) }
76   .text           :
77   {
78     _ftext = . ;
79     *(.text.unlikely .text.*_unlikely)
80     *(.text .stub .text.* .gnu.linkonce.t.*)
81     /* .gnu.warning sections are handled specially by elf32.em.  */
82     *(.gnu.warning)
83     *(.mips16.fn.*) *(.mips16.call.*)
84   } =0
85   .fini           :
86   {
87     KEEP (*(.fini))
88   } =0
89   PROVIDE (__etext = .);
90   PROVIDE (_etext = .);
91   PROVIDE (etext = .);
92   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
93   .rodata1        : { *(.rodata1) }
94   .eh_frame_hdr : { *(.eh_frame_hdr) }
95   .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
96   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
97   /* Adjust the address for the data segment.  We want to adjust up to
98      the same address within the page on the next page up.  */
99   . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
100   /* Exception handling  */
101   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
102   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
103   /* Thread Local Storage sections  */
104   .tdata          : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
105   .tbss           : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
106   .preinit_array     :
107   {
108     KEEP (*(.preinit_array))
109   }
110   .init_array     :
111   {
112      KEEP (*(SORT(.init_array.*)))
113      KEEP (*(.init_array))
114   }
115   .fini_array     :
116   {
117     KEEP (*(.fini_array))
118     KEEP (*(SORT(.fini_array.*)))
119   }
120   .ctors          :
121   {
122     /* gcc uses crtbegin.o to find the start of
123        the constructors, so we make sure it is
124        first.  Because this is a wildcard, it
125        doesn't matter if the user does not
126        actually link against crtbegin.o; the
127        linker won't look for a file to match a
128        wildcard.  The wildcard also means that it
129        doesn't matter which directory crtbegin.o
130        is in.  */
131     KEEP (*crtbegin.o(.ctors))
132     KEEP (*crtbegin?.o(.ctors))
133     /* We don't want to include the .ctor section from
134        the crtend.o file until after the sorted ctors.
135        The .ctor section from the crtend file contains the
136        end of ctors marker and it must be last */
137     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
138     KEEP (*(SORT(.ctors.*)))
139     KEEP (*(.ctors))
140   }
141   .dtors          :
142   {
143     KEEP (*crtbegin.o(.dtors))
144     KEEP (*crtbegin?.o(.dtors))
145     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
146     KEEP (*(SORT(.dtors.*)))
147     KEEP (*(.dtors))
148   }
149   .jcr            : { KEEP (*(.jcr)) }
150   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
151   . = DATA_SEGMENT_RELRO_END (0, .);
152   .data           :
153   {
154     _fdata = . ;
155     *(.data .data.* .gnu.linkonce.d.*)
156     SORT(CONSTRUCTORS)
157   }
158   .data1          : { *(.data1) }
159   .got.plt        : { *(.got.plt) }
160   . = .;
161   _gp = ALIGN(16) + 0x7ff0;
162   .got            : { *(.got) }
163   /* We want the small data sections together, so single-instruction offsets
164      can access them all, and initialized data all before uninitialized, so
165      we can shorten the on-disk segment size.  */
166   .sdata          :
167   {
168     *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
169     *(.sdata .sdata.* .gnu.linkonce.s.*)
170   }
171   .lit8           : { *(.lit8) }
172   .lit4           : { *(.lit4) }
173   .srdata         : { *(.srdata) }
174   _edata = .; PROVIDE (edata = .);
175   __bss_start = .;
176   _fbss = .;
177   .sbss           :
178   {
179     *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
180     *(.dynsbss)
181     *(.sbss .sbss.* .gnu.linkonce.sb.*)
182     *(.scommon)
183   }
184   .bss            :
185   {
186    *(.dynbss)
187    *(.bss .bss.* .gnu.linkonce.b.*)
188    *(COMMON)
189    /* Align here to ensure that the .bss section occupies space up to
190       _end.  Align after .bss to ensure correct alignment even if the
191       .bss section disappears because there are no input sections.
192       FIXME: Why do we need it? When there is no .bss section, we don't
193       pad the .data section.  */
194    . = ALIGN(. != 0 ? 64 / 8 : 1);
195   }
196   . = ALIGN(64 / 8);
197   . = ALIGN(64 / 8);
198   _end = .; PROVIDE (end = .);
199   . = DATA_SEGMENT_END (.);
200   /* Stabs debugging sections.  */
201   .stab          0 : { *(.stab) }
202   .stabstr       0 : { *(.stabstr) }
203   .stab.excl     0 : { *(.stab.excl) }
204   .stab.exclstr  0 : { *(.stab.exclstr) }
205   .stab.index    0 : { *(.stab.index) }
206   .stab.indexstr 0 : { *(.stab.indexstr) }
207   .comment       0 : { *(.comment) }
208   /* DWARF debug sections.
209      Symbols in the DWARF debugging sections are relative to the beginning
210      of the section so we begin them at 0.  */
211   /* DWARF 1 */
212   .debug          0 : { *(.debug) }
213   .line           0 : { *(.line) }
214   /* GNU DWARF 1 extensions */
215   .debug_srcinfo  0 : { *(.debug_srcinfo) }
216   .debug_sfnames  0 : { *(.debug_sfnames) }
217   /* DWARF 1.1 and DWARF 2 */
218   .debug_aranges  0 : { *(.debug_aranges) }
219   .debug_pubnames 0 : { *(.debug_pubnames) }
220   /* DWARF 2 */
221   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
222   .debug_abbrev   0 : { *(.debug_abbrev) }
223   .debug_line     0 : { *(.debug_line) }
224   .debug_frame    0 : { *(.debug_frame) }
225   .debug_str      0 : { *(.debug_str) }
226   .debug_loc      0 : { *(.debug_loc) }
227   .debug_macinfo  0 : { *(.debug_macinfo) }
228   /* SGI/MIPS DWARF 2 extensions */
229   .debug_weaknames 0 : { *(.debug_weaknames) }
230   .debug_funcnames 0 : { *(.debug_funcnames) }
231   .debug_typenames 0 : { *(.debug_typenames) }
232   .debug_varnames  0 : { *(.debug_varnames) }
233   /* DWARF 3 */
234   .debug_pubtypes 0 : { *(.debug_pubtypes) }
235   .debug_ranges   0 : { *(.debug_ranges) }
236   .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
237   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
238   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
239   /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }