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.xn
blobc57229d50d3bdea1a63073c0e257d0beff3dfc19
1 /* Script for -n: mix text and data on same page */
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   . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
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_SEGMENT_RELRO_END (0, .);
167   .data           :
168   {
169     _fdata = . ;
170     *(.data .data.* .gnu.linkonce.d.*)
171     SORT(CONSTRUCTORS)
172   }
173   .data1          : { *(.data1) }
174   .got.plt        : { *(.got.plt) }
175   . = .;
176   _gp = ALIGN(16) + 0x7ff0;
177   .got            : { *(.got) }
178   /* We want the small data sections together, so single-instruction offsets
179      can access them all, and initialized data all before uninitialized, so
180      we can shorten the on-disk segment size.  */
181   .sdata          :
182   {
183     *(.sdata .sdata.* .gnu.linkonce.s.*)
184   }
185   .lit8           : { *(.lit8) }
186   .lit4           : { *(.lit4) }
187   .srdata         : { *(.srdata) }
188   _edata = .; PROVIDE (edata = .);
189   __bss_start = .;
190   _fbss = .;
191   .sbss           :
192   {
193     *(.dynsbss)
194     *(.sbss .sbss.* .gnu.linkonce.sb.*)
195     *(.scommon)
196   }
197   .bss            :
198   {
199    *(.dynbss)
200    *(.bss .bss.* .gnu.linkonce.b.*)
201    *(COMMON)
202    /* Align here to ensure that the .bss section occupies space up to
203       _end.  Align after .bss to ensure correct alignment even if the
204       .bss section disappears because there are no input sections.
205       FIXME: Why do we need it? When there is no .bss section, we don't
206       pad the .data section.  */
207    . = ALIGN(. != 0 ? 64 / 8 : 1);
208   }
209   . = ALIGN(64 / 8);
210   . = ALIGN(64 / 8);
211   _end = .; PROVIDE (end = .);
212   . = DATA_SEGMENT_END (.);
213   /* Stabs debugging sections.  */
214   .stab          0 : { *(.stab) }
215   .stabstr       0 : { *(.stabstr) }
216   .stab.excl     0 : { *(.stab.excl) }
217   .stab.exclstr  0 : { *(.stab.exclstr) }
218   .stab.index    0 : { *(.stab.index) }
219   .stab.indexstr 0 : { *(.stab.indexstr) }
220   .comment       0 : { *(.comment) }
221   /* DWARF debug sections.
222      Symbols in the DWARF debugging sections are relative to the beginning
223      of the section so we begin them at 0.  */
224   /* DWARF 1 */
225   .debug          0 : { *(.debug) }
226   .line           0 : { *(.line) }
227   /* GNU DWARF 1 extensions */
228   .debug_srcinfo  0 : { *(.debug_srcinfo) }
229   .debug_sfnames  0 : { *(.debug_sfnames) }
230   /* DWARF 1.1 and DWARF 2 */
231   .debug_aranges  0 : { *(.debug_aranges) }
232   .debug_pubnames 0 : { *(.debug_pubnames) }
233   /* DWARF 2 */
234   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
235   .debug_abbrev   0 : { *(.debug_abbrev) }
236   .debug_line     0 : { *(.debug_line) }
237   .debug_frame    0 : { *(.debug_frame) }
238   .debug_str      0 : { *(.debug_str) }
239   .debug_loc      0 : { *(.debug_loc) }
240   .debug_macinfo  0 : { *(.debug_macinfo) }
241   /* SGI/MIPS DWARF 2 extensions */
242   .debug_weaknames 0 : { *(.debug_weaknames) }
243   .debug_funcnames 0 : { *(.debug_funcnames) }
244   .debug_typenames 0 : { *(.debug_typenames) }
245   .debug_varnames  0 : { *(.debug_varnames) }
246   /* DWARF 3 */
247   .debug_pubtypes 0 : { *(.debug_pubtypes) }
248   .debug_ranges   0 : { *(.debug_ranges) }
249   .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
250   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
251   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
252   /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }