1
/* ld script to make i386 Linux kernel
2
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
4
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
5
OUTPUT_ARCH(powerpc:common)
9
/* Read-only sections, merged into text segment: */
10
. = 0x60000000 + SIZEOF_HEADERS;
11
.interp : { *(.interp) }
13
.dynsym : { *(.dynsym) }
14
.dynstr : { *(.dynstr) }
15
.gnu.version : { *(.gnu.version) }
16
.gnu.version_d : { *(.gnu.version_d) }
17
.gnu.version_r : { *(.gnu.version_r) }
18
.rel.init : { *(.rel.init) }
19
.rela.init : { *(.rela.init) }
20
.rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
21
.rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
22
.rel.fini : { *(.rel.fini) }
23
.rela.fini : { *(.rela.fini) }
24
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
25
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
26
.rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
27
.rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
28
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
29
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
30
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
31
.rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
32
.rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
33
.rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
34
.rel.ctors : { *(.rel.ctors) }
35
.rela.ctors : { *(.rela.ctors) }
36
.rel.dtors : { *(.rel.dtors) }
37
.rela.dtors : { *(.rela.dtors) }
38
.rel.got : { *(.rel.got) }
39
.rela.got : { *(.rela.got) }
40
.rela.got1 : { *(.rela.got1) }
41
.rela.got2 : { *(.rela.got2) }
42
.rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
43
.rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
44
.rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
45
.rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
46
.rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
47
.rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
48
.rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
49
.rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
50
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
51
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
55
PROVIDE (__rel_iplt_start = .);
57
PROVIDE (__rel_iplt_end = .);
62
PROVIDE (__rela_iplt_start = .);
64
PROVIDE (__rela_iplt_end = .);
72
*(.text .stub .text.* .gnu.linkonce.t.*)
73
KEEP (*(.text.*personality*))
74
/* .gnu.warning sections are handled specially by elf32.em. */
82
PROVIDE (__etext = .);
85
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
86
.rodata1 : { *(.rodata1) }
89
PROVIDE (_SDA2_BASE_ = 32768);
90
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
92
.sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
93
.eh_frame_hdr : { *(.eh_frame_hdr) }
94
/* Adjust the address for the data segment. We want to adjust up to
95
the same address within the page on the next page up. */
96
. = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x1000);
97
/* Exception handling */
98
.eh_frame : { KEEP (*(.eh_frame)) }
99
.gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) }
100
/* Thread Local Storage sections */
101
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
102
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
105
PROVIDE (__preinit_array_start = .);
106
KEEP (*(.preinit_array))
107
PROVIDE (__preinit_array_end = .);
111
PROVIDE (__init_array_start = .);
112
KEEP (*(SORT(.init_array.*)))
113
KEEP (*(.init_array))
114
PROVIDE (__init_array_end = .);
118
PROVIDE (__fini_array_start = .);
119
KEEP (*(.fini_array))
120
KEEP (*(SORT(.fini_array.*)))
121
PROVIDE (__fini_array_end = .);
125
/* gcc uses crtbegin.o to find the start of
126
the constructors, so we make sure it is
127
first. Because this is a wildcard, it
128
doesn't matter if the user does not
129
actually link against crtbegin.o; the
130
linker won't look for a file to match a
131
wildcard. The wildcard also means that it
132
doesn't matter which directory crtbegin.o
134
KEEP (*crtbegin*.o(.ctors))
135
/* We don't want to include the .ctor section from
136
the crtend.o file until after the sorted ctors.
137
The .ctor section from the crtend file contains the
138
end of ctors marker and it must be last */
139
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
140
KEEP (*(SORT(.ctors.*)))
145
KEEP (*crtbegin*.o(.dtors))
146
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
147
KEEP (*(SORT(.dtors.*)))
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.*) }
154
.dynamic : { *(.dynamic) }
155
.got : SPECIAL { *(.got) }
156
. = DATA_SEGMENT_RELRO_END (0, .);
157
.plt : SPECIAL { *(.plt) }
160
*(.data .data.* .gnu.linkonce.d.*)
161
KEEP (*(.gnu.linkonce.d.*personality*))
164
.data1 : { *(.data1) }
165
.got : SPECIAL { *(.got) }
166
/* We want the small data sections together, so single-instruction offsets
167
can access them all, and initialized data all before uninitialized, so
168
we can shorten the on-disk segment size. */
171
PROVIDE (_SDA_BASE_ = 32768);
172
*(.sdata .sdata.* .gnu.linkonce.s.*)
174
_edata = .; PROVIDE (edata = .);
178
PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
180
*(.sbss .sbss.* .gnu.linkonce.sb.*)
182
PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
184
.plt : SPECIAL { *(.plt) }
188
*(.bss .bss.* .gnu.linkonce.b.*)
190
/* Align here to ensure that the .bss section occupies space up to
191
_end. Align after .bss to ensure correct alignment even if the
192
.bss section disappears because there are no input sections.
193
FIXME: Why do we need it? When there is no .bss section, we don't
194
pad the .data section. */
195
. = ALIGN(. != 0 ? 32 / 8 : 1);
199
_end = .; PROVIDE (end = .);
200
. = DATA_SEGMENT_END (.);
201
/* Stabs debugging sections. */
202
.stab 0 : { *(.stab) }
203
.stabstr 0 : { *(.stabstr) }
204
.stab.excl 0 : { *(.stab.excl) }
205
.stab.exclstr 0 : { *(.stab.exclstr) }
206
.stab.index 0 : { *(.stab.index) }
207
.stab.indexstr 0 : { *(.stab.indexstr) }
208
.comment 0 : { *(.comment) }
209
/* DWARF debug sections.
210
Symbols in the DWARF debugging sections are relative to the beginning
211
of the section so we begin them at 0. */
213
.debug 0 : { *(.debug) }
214
.line 0 : { *(.line) }
215
/* GNU DWARF 1 extensions */
216
.debug_srcinfo 0 : { *(.debug_srcinfo) }
217
.debug_sfnames 0 : { *(.debug_sfnames) }
218
/* DWARF 1.1 and DWARF 2 */
219
.debug_aranges 0 : { *(.debug_aranges) }
220
.debug_pubnames 0 : { *(.debug_pubnames) }
222
.debug_info 0 : { *(.debug_info) }
223
.debug_abbrev 0 : { *(.debug_abbrev) }
224
.debug_line 0 : { *(.debug_line) }
225
.debug_frame 0 : { *(.debug_frame) }
226
.debug_str 0 : { *(.debug_str) }
227
.debug_loc 0 : { *(.debug_loc) }
228
.debug_macinfo 0 : { *(.debug_macinfo) }
229
/* SGI/MIPS DWARF 2 extensions */
230
.debug_weaknames 0 : { *(.debug_weaknames) }
231
.debug_funcnames 0 : { *(.debug_funcnames) }
232
.debug_typenames 0 : { *(.debug_typenames) }
233
.debug_varnames 0 : { *(.debug_varnames) }
234
/* These must appear regardless of . */
235
/DISCARD/ : { *(.fixup) }
236
/DISCARD/ : { *(.note.GNU-stack) }