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