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