]> git.proxmox.com Git - qemu.git/blame - ppc.ld
Allow overriding the location of Samba's smbd.
[qemu.git] / ppc.ld
CommitLineData
766a487a
FB
1/* ld script to make i386 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3 */
4OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
85a6f129 5OUTPUT_ARCH(powerpc:common)
766a487a
FB
6ENTRY(_start)
7SECTIONS
8{
9 /* Read-only sections, merged into text segment: */
10 . = 0x60000000 + SIZEOF_HEADERS;
11 .interp : { *(.interp) }
12 .hash : { *(.hash) }
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) }
85a6f129
TS
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.*) }
52 .rel.plt : { *(.rel.plt) }
53 .rela.plt : { *(.rela.plt) }
54 .init :
766a487a 55 {
85a6f129
TS
56 KEEP (*(.init))
57 } =0
58 .text :
59 {
60 *(.text .stub .text.* .gnu.linkonce.t.*)
61 KEEP (*(.text.*personality*))
766a487a
FB
62 /* .gnu.warning sections are handled specially by elf32.em. */
63 *(.gnu.warning)
85a6f129
TS
64 *(.glink)
65 } =0x47ff041f
66 .fini :
67 {
68 KEEP (*(.fini))
766a487a 69 } =0x47ff041f
85a6f129
TS
70 PROVIDE (__etext = .);
71 PROVIDE (_etext = .);
766a487a 72 PROVIDE (etext = .);
85a6f129
TS
73 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
74 .rodata1 : { *(.rodata1) }
75 .sdata2 :
76 {
77 PROVIDE (_SDA2_BASE_ = 32768);
78 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
79 }
80 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
81 .eh_frame_hdr : { *(.eh_frame_hdr) }
766a487a
FB
82 /* Adjust the address for the data segment. We want to adjust up to
83 the same address within the page on the next page up. */
85a6f129
TS
84 . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x1000);
85 /* Exception handling */
7095e715
GH
86 .eh_frame : { KEEP (*(.eh_frame)) }
87 .gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) }
85a6f129
TS
88 /* Thread Local Storage sections */
89 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
90 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
91 .preinit_array :
92 {
7095e715 93 PROVIDE (__preinit_array_start = .);
85a6f129 94 KEEP (*(.preinit_array))
7095e715 95 PROVIDE (__preinit_array_end = .);
85a6f129
TS
96 }
97 .init_array :
98 {
7095e715 99 PROVIDE (__init_array_start = .);
85a6f129
TS
100 KEEP (*(SORT(.init_array.*)))
101 KEEP (*(.init_array))
7095e715 102 PROVIDE (__init_array_end = .);
85a6f129
TS
103 }
104 .fini_array :
105 {
7095e715 106 PROVIDE (__fini_array_start = .);
85a6f129
TS
107 KEEP (*(.fini_array))
108 KEEP (*(SORT(.fini_array.*)))
7095e715 109 PROVIDE (__fini_array_end = .);
85a6f129
TS
110 }
111 .ctors :
766a487a 112 {
85a6f129
TS
113 /* gcc uses crtbegin.o to find the start of
114 the constructors, so we make sure it is
115 first. Because this is a wildcard, it
116 doesn't matter if the user does not
117 actually link against crtbegin.o; the
118 linker won't look for a file to match a
119 wildcard. The wildcard also means that it
120 doesn't matter which directory crtbegin.o
121 is in. */
122 KEEP (*crtbegin*.o(.ctors))
123 /* We don't want to include the .ctor section from
124 the crtend.o file until after the sorted ctors.
125 The .ctor section from the crtend file contains the
126 end of ctors marker and it must be last */
127 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
128 KEEP (*(SORT(.ctors.*)))
129 KEEP (*(.ctors))
766a487a 130 }
85a6f129 131 .dtors :
766a487a 132 {
85a6f129
TS
133 KEEP (*crtbegin*.o(.dtors))
134 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
135 KEEP (*(SORT(.dtors.*)))
136 KEEP (*(.dtors))
766a487a 137 }
85a6f129
TS
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 .got1 : { *(.got1) }
141 .got2 : { *(.got2) }
142 .dynamic : { *(.dynamic) }
143 .got : SPECIAL { *(.got) }
144 . = DATA_SEGMENT_RELRO_END (0, .);
145 .plt : SPECIAL { *(.plt) }
146 .data :
766a487a 147 {
85a6f129
TS
148 *(.data .data.* .gnu.linkonce.d.*)
149 KEEP (*(.gnu.linkonce.d.*personality*))
150 SORT(CONSTRUCTORS)
766a487a 151 }
85a6f129
TS
152 .data1 : { *(.data1) }
153 .got : SPECIAL { *(.got) }
766a487a
FB
154 /* We want the small data sections together, so single-instruction offsets
155 can access them all, and initialized data all before uninitialized, so
156 we can shorten the on-disk segment size. */
85a6f129
TS
157 .sdata :
158 {
159 PROVIDE (_SDA_BASE_ = 32768);
160 *(.sdata .sdata.* .gnu.linkonce.s.*)
161 }
162 _edata = .; PROVIDE (edata = .);
766a487a 163 __bss_start = .;
85a6f129
TS
164 .sbss :
165 {
166 PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
167 *(.dynsbss)
168 *(.sbss .sbss.* .gnu.linkonce.sb.*)
169 *(.scommon)
170 PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
171 }
172 .plt : SPECIAL { *(.plt) }
173 .bss :
766a487a
FB
174 {
175 *(.dynbss)
85a6f129 176 *(.bss .bss.* .gnu.linkonce.b.*)
766a487a 177 *(COMMON)
85a6f129
TS
178 /* Align here to ensure that the .bss section occupies space up to
179 _end. Align after .bss to ensure correct alignment even if the
180 .bss section disappears because there are no input sections.
181 FIXME: Why do we need it? When there is no .bss section, we don't
182 pad the .data section. */
183 . = ALIGN(. != 0 ? 32 / 8 : 1);
766a487a 184 }
85a6f129
TS
185 . = ALIGN(32 / 8);
186 . = ALIGN(32 / 8);
187 _end = .; PROVIDE (end = .);
188 . = DATA_SEGMENT_END (.);
766a487a
FB
189 /* Stabs debugging sections. */
190 .stab 0 : { *(.stab) }
191 .stabstr 0 : { *(.stabstr) }
192 .stab.excl 0 : { *(.stab.excl) }
193 .stab.exclstr 0 : { *(.stab.exclstr) }
194 .stab.index 0 : { *(.stab.index) }
195 .stab.indexstr 0 : { *(.stab.indexstr) }
196 .comment 0 : { *(.comment) }
197 /* DWARF debug sections.
198 Symbols in the DWARF debugging sections are relative to the beginning
199 of the section so we begin them at 0. */
200 /* DWARF 1 */
201 .debug 0 : { *(.debug) }
202 .line 0 : { *(.line) }
203 /* GNU DWARF 1 extensions */
204 .debug_srcinfo 0 : { *(.debug_srcinfo) }
205 .debug_sfnames 0 : { *(.debug_sfnames) }
206 /* DWARF 1.1 and DWARF 2 */
207 .debug_aranges 0 : { *(.debug_aranges) }
208 .debug_pubnames 0 : { *(.debug_pubnames) }
209 /* DWARF 2 */
210 .debug_info 0 : { *(.debug_info) }
211 .debug_abbrev 0 : { *(.debug_abbrev) }
212 .debug_line 0 : { *(.debug_line) }
213 .debug_frame 0 : { *(.debug_frame) }
214 .debug_str 0 : { *(.debug_str) }
215 .debug_loc 0 : { *(.debug_loc) }
216 .debug_macinfo 0 : { *(.debug_macinfo) }
217 /* SGI/MIPS DWARF 2 extensions */
218 .debug_weaknames 0 : { *(.debug_weaknames) }
219 .debug_funcnames 0 : { *(.debug_funcnames) }
220 .debug_typenames 0 : { *(.debug_typenames) }
221 .debug_varnames 0 : { *(.debug_varnames) }
222 /* These must appear regardless of . */
85a6f129
TS
223 /DISCARD/ : { *(.fixup) }
224 /DISCARD/ : { *(.note.GNU-stack) }
766a487a 225}