]> git.proxmox.com Git - qemu.git/blame - s390.ld
global s/fflush(logfile)/qemu_log_flush()/ (Eduardo Habkost)
[qemu.git] / s390.ld
CommitLineData
3c51961e
FB
1OUTPUT_FORMAT("elf32-s390", "elf32-s390",
2 "elf32-s390")
3OUTPUT_ARCH(s390:31-bit)
4ENTRY(_start)
5SEARCH_DIR("/usr/s390-redhat-linux/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib");
6/* Do we need any of these for elf?
7 __DYNAMIC = 0; */
8SECTIONS
9{
10 /* Read-only sections, merged into text segment: */
11 . = 0x60000000 + SIZEOF_HEADERS;
12 .interp : { *(.interp) }
13 .hash : { *(.hash) }
14 .dynsym : { *(.dynsym) }
15 .dynstr : { *(.dynstr) }
16 .gnu.version : { *(.gnu.version) }
17 .gnu.version_d : { *(.gnu.version_d) }
18 .gnu.version_r : { *(.gnu.version_r) }
19 .rel.dyn :
20 {
21 *(.rel.init)
22 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
23 *(.rel.fini)
24 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
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.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
50 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
51 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
52 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
53 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
54 }
55 .rel.plt : { *(.rel.plt) }
56 .rela.plt : { *(.rela.plt) }
57 .init :
58 {
59 KEEP (*(.init))
60 } =0x07070707
61 .plt : { *(.plt) }
62 .text :
63 {
64 *(.text .stub .text.* .gnu.linkonce.t.*)
65 /* .gnu.warning sections are handled specially by elf32.em. */
66 *(.gnu.warning)
67 } =0x07070707
68 .fini :
69 {
70 KEEP (*(.fini))
71 } =0x07070707
72 PROVIDE (__etext = .);
73 PROVIDE (_etext = .);
74 PROVIDE (etext = .);
75 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
76 .rodata1 : { *(.rodata1) }
77 .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
78 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
79 .eh_frame_hdr : { *(.eh_frame_hdr) }
80 /* Adjust the address for the data segment. We want to adjust up to
81 the same address within the page on the next page up. */
82 . = ALIGN(0x1000) + (. & (0x1000 - 1));
83 /* Ensure the __preinit_array_start label is properly aligned. We
84 could instead move the label definition inside the section, but
85 the linker would then create the section even if it turns out to
86 be empty, which isn't pretty. */
87 . = ALIGN(32 / 8);
88 PROVIDE (__preinit_array_start = .);
89 .preinit_array : { *(.preinit_array) }
90 PROVIDE (__preinit_array_end = .);
91 PROVIDE (__init_array_start = .);
92 .init_array : { *(.init_array) }
93 PROVIDE (__init_array_end = .);
94 PROVIDE (__fini_array_start = .);
95 .fini_array : { *(.fini_array) }
96 PROVIDE (__fini_array_end = .);
97 .data :
98 {
99 *(.data .data.* .gnu.linkonce.d.*)
100 SORT(CONSTRUCTORS)
101 }
102 .data1 : { *(.data1) }
103 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
104 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
105 .eh_frame : { KEEP (*(.eh_frame)) }
106 .gcc_except_table : { *(.gcc_except_table) }
107 .dynamic : { *(.dynamic) }
108 .ctors :
109 {
110 /* gcc uses crtbegin.o to find the start of
111 the constructors, so we make sure it is
112 first. Because this is a wildcard, it
113 doesn't matter if the user does not
114 actually link against crtbegin.o; the
115 linker won't look for a file to match a
116 wildcard. The wildcard also means that it
117 doesn't matter which directory crtbegin.o
118 is in. */
119 KEEP (*crtbegin.o(.ctors))
120 /* We don't want to include the .ctor section from
121 from the crtend.o file until after the sorted ctors.
122 The .ctor section from the crtend file contains the
123 end of ctors marker and it must be last */
124 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
125 KEEP (*(SORT(.ctors.*)))
126 KEEP (*(.ctors))
127 }
128 .dtors :
129 {
130 KEEP (*crtbegin.o(.dtors))
131 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
132 KEEP (*(SORT(.dtors.*)))
133 KEEP (*(.dtors))
134 }
135 .jcr : { KEEP (*(.jcr)) }
136 .got : { *(.got.plt) *(.got) }
137 /* We want the small data sections together, so single-instruction offsets
138 can access them all, and initialized data all before uninitialized, so
139 we can shorten the on-disk segment size. */
140 .sdata :
141 {
142 *(.sdata .sdata.* .gnu.linkonce.s.*)
143 }
144 _edata = .;
145 PROVIDE (edata = .);
146 __bss_start = .;
147 .sbss :
148 {
149 PROVIDE (__sbss_start = .);
150 PROVIDE (___sbss_start = .);
151 *(.dynsbss)
152 *(.sbss .sbss.* .gnu.linkonce.sb.*)
153 *(.scommon)
154 PROVIDE (__sbss_end = .);
155 PROVIDE (___sbss_end = .);
156 }
157 .bss :
158 {
159 *(.dynbss)
160 *(.bss .bss.* .gnu.linkonce.b.*)
161 *(COMMON)
162 /* Align here to ensure that the .bss section occupies space up to
163 _end. Align after .bss to ensure correct alignment even if the
164 .bss section disappears because there are no input sections. */
165 . = ALIGN(32 / 8);
166 }
167 . = ALIGN(32 / 8);
168 _end = .;
169 PROVIDE (end = .);
170 /* Stabs debugging sections. */
171 .stab 0 : { *(.stab) }
172 .stabstr 0 : { *(.stabstr) }
173 .stab.excl 0 : { *(.stab.excl) }
174 .stab.exclstr 0 : { *(.stab.exclstr) }
175 .stab.index 0 : { *(.stab.index) }
176 .stab.indexstr 0 : { *(.stab.indexstr) }
177 .comment 0 : { *(.comment) }
178 /* DWARF debug sections.
179 Symbols in the DWARF debugging sections are relative to the beginning
180 of the section so we begin them at 0. */
181 /* DWARF 1 */
182 .debug 0 : { *(.debug) }
183 .line 0 : { *(.line) }
184 /* GNU DWARF 1 extensions */
185 .debug_srcinfo 0 : { *(.debug_srcinfo) }
186 .debug_sfnames 0 : { *(.debug_sfnames) }
187 /* DWARF 1.1 and DWARF 2 */
188 .debug_aranges 0 : { *(.debug_aranges) }
189 .debug_pubnames 0 : { *(.debug_pubnames) }
190 /* DWARF 2 */
191 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
192 .debug_abbrev 0 : { *(.debug_abbrev) }
193 .debug_line 0 : { *(.debug_line) }
194 .debug_frame 0 : { *(.debug_frame) }
195 .debug_str 0 : { *(.debug_str) }
196 .debug_loc 0 : { *(.debug_loc) }
197 .debug_macinfo 0 : { *(.debug_macinfo) }
198 /* SGI/MIPS DWARF 2 extensions */
199 .debug_weaknames 0 : { *(.debug_weaknames) }
200 .debug_funcnames 0 : { *(.debug_funcnames) }
201 .debug_typenames 0 : { *(.debug_typenames) }
202 .debug_varnames 0 : { *(.debug_varnames) }
203}