]> git.proxmox.com Git - qemu.git/blob - ppc64.ld
qemu-nbd: print error messages from the daemon through a pipe
[qemu.git] / ppc64.ld
1 /* Script for -z combreloc: combine and sort reloc sections */
2 OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc",
3 "elf64-powerpc")
4 OUTPUT_ARCH(powerpc:common64)
5 ENTRY(_start)
6 /* __DYNAMIC = 0; */
7 SECTIONS
8 {
9 /* Read-only sections, merged into text segment: */
10 PROVIDE (__executable_start = 0x60000000); . = 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) }
18 .rel.dyn :
19 {
20 *(.rel.init)
21 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
22 *(.rel.fini)
23 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
24 *(.rel.data.rel.ro*)
25 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
26 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
27 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
28 *(.rel.ctors)
29 *(.rel.dtors)
30 *(.rel.got)
31 *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
32 *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
33 *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
34 *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
35 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
36 }
37 .rela.dyn :
38 {
39 *(.rela.init)
40 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
41 *(.rela.fini)
42 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
43 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
44 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
45 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
46 *(.rela.ctors)
47 *(.rela.dtors)
48 *(.rela.got)
49 *(.rela.toc)
50 *(.rela.opd)
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 .rela.tocbss : { *(.rela.tocbss) }
60 .init :
61 {
62 KEEP (*(.init))
63 } =0x60000000
64 .text :
65 {
66 *(.text .stub .text.* .gnu.linkonce.t.*)
67 KEEP (*(.text.*personality*))
68 /* .gnu.warning sections are handled specially by elf32.em. */
69 *(.gnu.warning)
70 *(.sfpr .glink)
71 } =0x60000000
72 .fini :
73 {
74 KEEP (*(.fini))
75 } =0x60000000
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 (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN
87 (0x10000, 0x1000); /* Exception handling */
88 .eh_frame : { KEEP (*(.eh_frame)) }
89 .gcc_except_table : { KEEP (*(.gcc_except_table))
90 *(.gcc_except_table.*) } /* Thread Local Storage sections */
91 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
92 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
93 /* Ensure the __preinit_array_start label is properly aligned. We
94 could instead move the label definition inside the section, but
95 the linker would then create the section even if it turns out to
96 be empty, which isn't pretty. */
97 . = ALIGN(64 / 8);
98 PROVIDE (__preinit_array_start = .);
99 .preinit_array : { KEEP (*(.preinit_array)) }
100 PROVIDE (__preinit_array_end = .);
101 PROVIDE (__init_array_start = .);
102 .init_array : { KEEP (*(.init_array)) }
103 PROVIDE (__init_array_end = .);
104 PROVIDE (__fini_array_start = .);
105 .fini_array : { KEEP (*(.fini_array)) }
106 PROVIDE (__fini_array_end = .);
107 .ctors :
108 {
109 /* gcc uses crtbegin.o to find the start of
110 the constructors, so we make sure it is
111 first. Because this is a wildcard, it
112 doesn't matter if the user does not
113 actually link against crtbegin.o; the
114 linker won't look for a file to match a
115 wildcard. The wildcard also means that it
116 doesn't matter which directory crtbegin.o
117 is in. */
118 KEEP (*crtbegin*.o(.ctors))
119 /* We don't want to include the .ctor section from
120 from the crtend.o file until after the sorted ctors.
121 The .ctor section from the crtend file contains the
122 end of ctors marker and it must be last */
123 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
124 KEEP (*(SORT(.ctors.*)))
125 KEEP (*(.ctors))
126 }
127 .dtors :
128 {
129 KEEP (*crtbegin*.o(.dtors))
130 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
131 KEEP (*(SORT(.dtors.*)))
132 KEEP (*(.dtors))
133 }
134 .jcr : { KEEP (*(.jcr)) }
135 .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
136 .dynamic : { *(.dynamic) }
137 . = DATA_SEGMENT_RELRO_END (0, .);
138 .data :
139 {
140 *(.data .data.* .gnu.linkonce.d.*)
141 KEEP (*(.gnu.linkonce.d.*personality*))
142 SORT(CONSTRUCTORS)
143 }
144 .data1 : { *(.data1) }
145 .toc1 ALIGN(8) : { *(.toc1) }
146 .opd ALIGN(8) : { KEEP (*(.opd)) }
147 .got ALIGN(8) : { *(.got .toc) }
148 /* We want the small data sections together, so single-instruction offsets
149 can access them all, and initialized data all before uninitialized, so
150 we can shorten the on-disk segment size. */
151 .sdata :
152 {
153 *(.sdata .sdata.* .gnu.linkonce.s.*)
154 }
155 _edata = .;
156 PROVIDE (edata = .);
157 __bss_start = .;
158 .tocbss ALIGN(8) : { *(.tocbss)}
159 .sbss :
160 {
161 PROVIDE (__sbss_start = .);
162 PROVIDE (___sbss_start = .);
163 *(.dynsbss)
164 *(.sbss .sbss.* .gnu.linkonce.sb.*)
165 *(.scommon)
166 PROVIDE (__sbss_end = .);
167 PROVIDE (___sbss_end = .);
168 }
169 .plt : { *(.plt) }
170 .bss :
171 {
172 *(.dynbss)
173 *(.bss .bss.* .gnu.linkonce.b.*)
174 *(COMMON)
175 /* Align here to ensure that the .bss section occupies space up to
176 _end. Align after .bss to ensure correct alignment even if the
177 .bss section disappears because there are no input sections. */
178 . = ALIGN(64 / 8);
179 }
180 . = ALIGN(64 / 8);
181 _end = .;
182 PROVIDE (end = .);
183 . = DATA_SEGMENT_END (.);
184 /* Stabs debugging sections. */
185 .stab 0 : { *(.stab) }
186 .stabstr 0 : { *(.stabstr) }
187 .stab.excl 0 : { *(.stab.excl) }
188 .stab.exclstr 0 : { *(.stab.exclstr) }
189 .stab.index 0 : { *(.stab.index) }
190 .stab.indexstr 0 : { *(.stab.indexstr) }
191 .comment 0 : { *(.comment) }
192 /* DWARF debug sections.
193 Symbols in the DWARF debugging sections are relative to the beginning
194 of the section so we begin them at 0. */
195 /* DWARF 1 */
196 .debug 0 : { *(.debug) }
197 .line 0 : { *(.line) }
198 /* GNU DWARF 1 extensions */
199 .debug_srcinfo 0 : { *(.debug_srcinfo) }
200 .debug_sfnames 0 : { *(.debug_sfnames) }
201 /* DWARF 1.1 and DWARF 2 */
202 .debug_aranges 0 : { *(.debug_aranges) }
203 .debug_pubnames 0 : { *(.debug_pubnames) }
204 /* DWARF 2 */
205 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
206 .debug_abbrev 0 : { *(.debug_abbrev) }
207 .debug_line 0 : { *(.debug_line) }
208 .debug_frame 0 : { *(.debug_frame) }
209 .debug_str 0 : { *(.debug_str) }
210 .debug_loc 0 : { *(.debug_loc) }
211 .debug_macinfo 0 : { *(.debug_macinfo) }
212 /* SGI/MIPS DWARF 2 extensions */
213 .debug_weaknames 0 : { *(.debug_weaknames) }
214 .debug_funcnames 0 : { *(.debug_funcnames) }
215 .debug_typenames 0 : { *(.debug_typenames) }
216 .debug_varnames 0 : { *(.debug_varnames) }
217 /DISCARD/ : { *(.note.GNU-stack) }
218 }