Annotation of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/mips/klibc.ld
Parent Directory | Revision Log
Revision 532 -
(hide annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 7515 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 7515 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | niro | 532 | /* Linker script for klibc.so, needed because of the the damned |
2 | GNU ld script headers problem */ | ||
3 | |||
4 | ENTRY(__start) | ||
5 | SECTIONS | ||
6 | { | ||
7 | /* Read-only sections, merged into text segment: */ | ||
8 | /* This address needs to be reachable using normal inter-module | ||
9 | calls, and work on the memory models for this architecture */ | ||
10 | /* 2 MB -- the normal starting point for text is 4 MB */ | ||
11 | . = 0x00200400; | ||
12 | .interp : { *(.interp) } | ||
13 | .reginfo : { *(.reginfo) } | ||
14 | .dynamic : { *(.dynamic) } | ||
15 | .hash : { *(.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.data.* .rel.gnu.linkonce.d.*) | ||
28 | *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) | ||
29 | *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) | ||
30 | *(.rel.ctors) | ||
31 | *(.rel.dtors) | ||
32 | *(.rel.got) | ||
33 | *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) | ||
34 | *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) | ||
35 | *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) | ||
36 | *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) | ||
37 | *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) | ||
38 | } | ||
39 | .rela.dyn : | ||
40 | { | ||
41 | *(.rela.init) | ||
42 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) | ||
43 | *(.rela.fini) | ||
44 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) | ||
45 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) | ||
46 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) | ||
47 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) | ||
48 | *(.rela.ctors) | ||
49 | *(.rela.dtors) | ||
50 | *(.rela.got) | ||
51 | *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) | ||
52 | *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) | ||
53 | *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) | ||
54 | *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) | ||
55 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) | ||
56 | } | ||
57 | .rel.plt : { *(.rel.plt) } | ||
58 | .rela.plt : { *(.rela.plt) } | ||
59 | .init : | ||
60 | { | ||
61 | KEEP (*(.init)) | ||
62 | } =0 | ||
63 | .plt : { *(.plt) } | ||
64 | .text : | ||
65 | { | ||
66 | _ftext = . ; | ||
67 | *(.text .stub .text.* .gnu.linkonce.t.*) | ||
68 | /* .gnu.warning sections are handled specially by elf32.em. */ | ||
69 | *(.gnu.warning) | ||
70 | *(.mips16.fn.*) *(.mips16.call.*) | ||
71 | } =0 | ||
72 | .fini : | ||
73 | { | ||
74 | KEEP (*(.fini)) | ||
75 | } =0 | ||
76 | PROVIDE (__etext = .); | ||
77 | PROVIDE (_etext = .); | ||
78 | PROVIDE (etext = .); | ||
79 | .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } | ||
80 | .rodata1 : { *(.rodata1) } | ||
81 | .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } | ||
82 | .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } | ||
83 | .eh_frame_hdr : { *(.eh_frame_hdr) } | ||
84 | /* Adjust the address for the data segment. We want to adjust up to | ||
85 | the same address within the page on the next page up. */ | ||
86 | . = ALIGN(8192); | ||
87 | /* Ensure the __preinit_array_start label is properly aligned. We | ||
88 | could instead move the label definition inside the section, but | ||
89 | the linker would then create the section even if it turns out to | ||
90 | be empty, which isn't pretty. */ | ||
91 | . = ALIGN(32 / 8); | ||
92 | PROVIDE (__preinit_array_start = .); | ||
93 | .preinit_array : { *(.preinit_array) } | ||
94 | PROVIDE (__preinit_array_end = .); | ||
95 | PROVIDE (__init_array_start = .); | ||
96 | .init_array : { *(.init_array) } | ||
97 | PROVIDE (__init_array_end = .); | ||
98 | PROVIDE (__fini_array_start = .); | ||
99 | .fini_array : { *(.fini_array) } | ||
100 | PROVIDE (__fini_array_end = .); | ||
101 | .data : | ||
102 | { | ||
103 | _fdata = . ; | ||
104 | *(.data .data.* .gnu.linkonce.d.*) | ||
105 | SORT(CONSTRUCTORS) | ||
106 | } | ||
107 | .data1 : { *(.data1) } | ||
108 | .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } | ||
109 | .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } | ||
110 | .eh_frame : { KEEP (*(.eh_frame)) } | ||
111 | .gcc_except_table : { *(.gcc_except_table) } | ||
112 | .ctors : | ||
113 | { | ||
114 | /* gcc uses crtbegin.o to find the start of | ||
115 | the constructors, so we make sure it is | ||
116 | first. Because this is a wildcard, it | ||
117 | doesn't matter if the user does not | ||
118 | actually link against crtbegin.o; the | ||
119 | linker won't look for a file to match a | ||
120 | wildcard. The wildcard also means that it | ||
121 | doesn't matter which directory crtbegin.o | ||
122 | is in. */ | ||
123 | KEEP (*crtbegin*.o(.ctors)) | ||
124 | /* We don't want to include the .ctor section from | ||
125 | from the crtend.o file until after the sorted ctors. | ||
126 | The .ctor section from the crtend file contains the | ||
127 | end of ctors marker and it must be last */ | ||
128 | KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) | ||
129 | KEEP (*(SORT(.ctors.*))) | ||
130 | KEEP (*(.ctors)) | ||
131 | } | ||
132 | .dtors : | ||
133 | { | ||
134 | KEEP (*crtbegin*.o(.dtors)) | ||
135 | KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) | ||
136 | KEEP (*(SORT(.dtors.*))) | ||
137 | KEEP (*(.dtors)) | ||
138 | } | ||
139 | .jcr : { KEEP (*(.jcr)) } | ||
140 | _gp = ALIGN(16) + 0x7ff0; | ||
141 | .got : { *(.got.plt) *(.got) } | ||
142 | /* We want the small data sections together, so single-instruction offsets | ||
143 | can access them all, and initialized data all before uninitialized, so | ||
144 | we can shorten the on-disk segment size. */ | ||
145 | .sdata : | ||
146 | { | ||
147 | *(.sdata .sdata.* .gnu.linkonce.s.*) | ||
148 | } | ||
149 | .lit8 : { *(.lit8) } | ||
150 | .lit4 : { *(.lit4) } | ||
151 | _edata = .; | ||
152 | PROVIDE (edata = .); | ||
153 | __bss_start = .; | ||
154 | _fbss = .; | ||
155 | .sbss : | ||
156 | { | ||
157 | PROVIDE (__sbss_start = .); | ||
158 | PROVIDE (___sbss_start = .); | ||
159 | *(.dynsbss) | ||
160 | *(.sbss .sbss.* .gnu.linkonce.sb.*) | ||
161 | *(.scommon) | ||
162 | PROVIDE (__sbss_end = .); | ||
163 | PROVIDE (___sbss_end = .); | ||
164 | } | ||
165 | .bss : | ||
166 | { | ||
167 | *(.dynbss) | ||
168 | *(.bss .bss.* .gnu.linkonce.b.*) | ||
169 | *(COMMON) | ||
170 | /* Align here to ensure that the .bss section occupies space up to | ||
171 | _end. Align after .bss to ensure correct alignment even if the | ||
172 | .bss section disappears because there are no input sections. */ | ||
173 | . = ALIGN(32 / 8); | ||
174 | } | ||
175 | . = ALIGN(32 / 8); | ||
176 | _end = .; | ||
177 | PROVIDE (end = .); | ||
178 | /* Stabs debugging sections. */ | ||
179 | .stab 0 : { *(.stab) } | ||
180 | .stabstr 0 : { *(.stabstr) } | ||
181 | .stab.excl 0 : { *(.stab.excl) } | ||
182 | .stab.exclstr 0 : { *(.stab.exclstr) } | ||
183 | .stab.index 0 : { *(.stab.index) } | ||
184 | .stab.indexstr 0 : { *(.stab.indexstr) } | ||
185 | .comment 0 : { *(.comment) } | ||
186 | /* DWARF debug sections. | ||
187 | Symbols in the DWARF debugging sections are relative to the beginning | ||
188 | of the section so we begin them at 0. */ | ||
189 | /* DWARF 1 */ | ||
190 | .debug 0 : { *(.debug) } | ||
191 | .line 0 : { *(.line) } | ||
192 | /* GNU DWARF 1 extensions */ | ||
193 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | ||
194 | .debug_sfnames 0 : { *(.debug_sfnames) } | ||
195 | /* DWARF 1.1 and DWARF 2 */ | ||
196 | .debug_aranges 0 : { *(.debug_aranges) } | ||
197 | .debug_pubnames 0 : { *(.debug_pubnames) } | ||
198 | /* DWARF 2 */ | ||
199 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } | ||
200 | .debug_abbrev 0 : { *(.debug_abbrev) } | ||
201 | .debug_line 0 : { *(.debug_line) } | ||
202 | .debug_frame 0 : { *(.debug_frame) } | ||
203 | .debug_str 0 : { *(.debug_str) } | ||
204 | .debug_loc 0 : { *(.debug_loc) } | ||
205 | .debug_macinfo 0 : { *(.debug_macinfo) } | ||
206 | /* SGI/MIPS DWARF 2 extensions */ | ||
207 | .debug_weaknames 0 : { *(.debug_weaknames) } | ||
208 | .debug_funcnames 0 : { *(.debug_funcnames) } | ||
209 | .debug_typenames 0 : { *(.debug_typenames) } | ||
210 | .debug_varnames 0 : { *(.debug_varnames) } | ||
211 | .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } | ||
212 | .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } | ||
213 | /DISCARD/ : { *(.note.GNU-stack) } | ||
214 | } |