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 / elf64btsmip.xbn
blob5336c692613809c05041397a7e3ae8c619933f34
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")
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   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) }
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       PROVIDE_HIDDEN (__rel_iplt_start = .);
57       *(.rel.iplt)
58       PROVIDE_HIDDEN (__rel_iplt_end = .);
59     }
60   .rela.iplt      :
61     {
62       PROVIDE_HIDDEN (__rela_iplt_start = .);
63       *(.rela.iplt)
64       PROVIDE_HIDDEN (__rela_iplt_end = .);
65     }
66   .rel.plt        :
67     {
68       *(.rel.plt)
69     }
70   .rela.plt       :
71     {
72       *(.rela.plt)
73     }
74   .init           :
75   {
76     KEEP (*(.init))
77   } =0
78   .plt            : { *(.plt) }
79   .iplt           : { *(.iplt) }
80   .text           :
81   {
82     _ftext = . ;
83     *(.text.unlikely .text.*_unlikely)
84     *(.text .stub .text.* .gnu.linkonce.t.*)
85     /* .gnu.warning sections are handled specially by elf32.em.  */
86     *(.gnu.warning)
87     *(.mips16.fn.*) *(.mips16.call.*)
88   } =0
89   .fini           :
90   {
91     KEEP (*(.fini))
92   } =0
93   PROVIDE (__etext = .);
94   PROVIDE (_etext = .);
95   PROVIDE (etext = .);
96   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
97   .rodata1        : { *(.rodata1) }
98   .sdata2         :
99   {
100     *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
101   }
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.  */
108   . = .;
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) }
115   .preinit_array     :
116   {
117     PROVIDE_HIDDEN (__preinit_array_start = .);
118     KEEP (*(.preinit_array))
119     PROVIDE_HIDDEN (__preinit_array_end = .);
120   }
121   .init_array     :
122   {
123      PROVIDE_HIDDEN (__init_array_start = .);
124      KEEP (*(SORT(.init_array.*)))
125      KEEP (*(.init_array))
126      PROVIDE_HIDDEN (__init_array_end = .);
127   }
128   .fini_array     :
129   {
130     PROVIDE_HIDDEN (__fini_array_start = .);
131     KEEP (*(.fini_array))
132     KEEP (*(SORT(.fini_array.*)))
133     PROVIDE_HIDDEN (__fini_array_end = .);
134   }
135   .ctors          :
136   {
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
145        is in.  */
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.*)))
154     KEEP (*(.ctors))
155   }
156   .dtors          :
157   {
158     KEEP (*crtbegin.o(.dtors))
159     KEEP (*crtbegin?.o(.dtors))
160     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
161     KEEP (*(SORT(.dtors.*)))
162     KEEP (*(.dtors))
163   }
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.*) }
166   .data           :
167   {
168     _fdata = . ;
169     *(.data .data.* .gnu.linkonce.d.*)
170     SORT(CONSTRUCTORS)
171   }
172   .data1          : { *(.data1) }
173   .got.plt        : { *(.got.plt) }
174   . = .;
175   _gp = ALIGN(16) + 0x7ff0;
176   .got            : { *(.got) }
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.  */
180   .sdata          :
181   {
182     *(.sdata .sdata.* .gnu.linkonce.s.*)
183   }
184   .lit8           : { *(.lit8) }
185   .lit4           : { *(.lit4) }
186   .srdata         : { *(.srdata) }
187   _edata = .; PROVIDE (edata = .);
188   __bss_start = .;
189   _fbss = .;
190   .sbss           :
191   {
192     *(.dynsbss)
193     *(.sbss .sbss.* .gnu.linkonce.sb.*)
194     *(.scommon)
195   }
196   .bss            :
197   {
198    *(.dynbss)
199    *(.bss .bss.* .gnu.linkonce.b.*)
200    *(COMMON)
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);
207   }
208   . = ALIGN(64 / 8);
209   . = ALIGN(64 / 8);
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.  */
222   /* DWARF 1 */
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) }
231   /* DWARF 2 */
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) }
244   /* DWARF 3 */
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_*) }