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