]> git.proxmox.com Git - qemu.git/blob - hppa.ld
Version 1.0.1
[qemu.git] / hppa.ld
1 /* Default linker script, for normal executables */
2 OUTPUT_FORMAT("elf32-hppa-linux", "elf32-hppa-linux",
3 "elf32-hppa-linux")
4 OUTPUT_ARCH(hppa:hppa1.1)
5 ENTRY(_start)
6 SECTIONS
7 {
8 /* Read-only sections, merged into text segment: */
9 PROVIDE (__executable_start = 0x60000000); . = 0x60000000 + SIZEOF_HEADERS;
10 .interp : { *(.interp) }
11 .hash : { *(.hash) }
12 .dynsym : { *(.dynsym) }
13 .dynstr : { *(.dynstr) }
14 .gnu.version : { *(.gnu.version) }
15 .gnu.version_d : { *(.gnu.version_d) }
16 .gnu.version_r : { *(.gnu.version_r) }
17 .rel.init : { *(.rel.init) }
18 .rela.init : { *(.rela.init) }
19 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
20 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
21 .rel.fini : { *(.rel.fini) }
22 .rela.fini : { *(.rela.fini) }
23 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
24 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
25 .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
26 .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
27 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
28 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
29 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
30 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
31 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
32 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
33 .rel.ctors : { *(.rel.ctors) }
34 .rela.ctors : { *(.rela.ctors) }
35 .rel.dtors : { *(.rel.dtors) }
36 .rela.dtors : { *(.rela.dtors) }
37 .rel.got : { *(.rel.got) }
38 .rela.got : { *(.rela.got) }
39 .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
40 .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
41 .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
42 .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
43 .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
44 .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
45 .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
46 .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
47 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
48 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
49 .rel.plt : { *(.rel.plt) }
50 .rela.plt : { *(.rela.plt) }
51 .init :
52 {
53 KEEP (*(.init))
54 } =0x08000240
55 .text :
56 {
57 *(.text .stub .text.* .gnu.linkonce.t.*)
58 KEEP (*(.text.*personality*))
59 /* .gnu.warning sections are handled specially by elf32.em. */
60 *(.gnu.warning)
61 } =0x08000240
62 .fini :
63 {
64 KEEP (*(.fini))
65 } =0x08000240
66 PROVIDE (__etext = .);
67 PROVIDE (_etext = .);
68 PROVIDE (etext = .);
69 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
70 .rodata1 : { *(.rodata1) }
71 .sdata2 :
72 {
73 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
74 }
75 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
76 .PARISC.unwind : { *(.PARISC.unwind) }
77 .eh_frame_hdr : { *(.eh_frame_hdr) }
78 /* Adjust the address for the data segment. We want to adjust up to
79 the same address within the page on the next page up. */
80 . = ALIGN(0x10000) + (. & (0x10000 - 1));
81 /* Exception handling */
82 .eh_frame : { KEEP (*(.eh_frame)) }
83 .gcc_except_table : { *(.gcc_except_table .gcc_except_table.*) }
84 /* Thread Local Storage sections */
85 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
86 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
87 .preinit_array :
88 {
89 PROVIDE (__preinit_array_start = .);
90 KEEP (*(.preinit_array))
91 PROVIDE (__preinit_array_end = .);
92 }
93 .init_array :
94 {
95 PROVIDE (__init_array_start = .);
96 KEEP (*(SORT(.init_array.*)))
97 KEEP (*(.init_array))
98 PROVIDE (__init_array_end = .);
99 }
100 .fini_array :
101 {
102 PROVIDE (__fini_array_start = .);
103 KEEP (*(.fini_array))
104 KEEP (*(SORT(.fini_array.*)))
105 PROVIDE (__fini_array_end = .);
106 }
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 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* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
136 .dynamic : { *(.dynamic) }
137 .data :
138 {
139 PROVIDE ($global$ = .);
140 *(.data .data.* .gnu.linkonce.d.*)
141 KEEP (*(.gnu.linkonce.d.*personality*))
142 SORT(CONSTRUCTORS)
143 }
144 .data1 : { *(.data1) }
145 .plt : { *(.plt) }
146 .got : { *(.got.plt) *(.got) }
147 /* We want the small data sections together, so single-instruction offsets
148 can access them all, and initialized data all before uninitialized, so
149 we can shorten the on-disk segment size. */
150 .sdata :
151 {
152 *(.sdata .sdata.* .gnu.linkonce.s.*)
153 }
154 _edata = .; PROVIDE (edata = .);
155 __bss_start = .;
156 .sbss :
157 {
158 *(.dynsbss)
159 *(.sbss .sbss.* .gnu.linkonce.sb.*)
160 *(.scommon)
161 }
162 .bss :
163 {
164 *(.dynbss)
165 *(.bss .bss.* .gnu.linkonce.b.*)
166 *(COMMON)
167 /* Align here to ensure that the .bss section occupies space up to
168 _end. Align after .bss to ensure correct alignment even if the
169 .bss section disappears because there are no input sections.
170 FIXME: Why do we need it? When there is no .bss section, we don't
171 pad the .data section. */
172 . = ALIGN(. != 0 ? 32 / 8 : 1);
173 }
174 . = ALIGN(32 / 8);
175 . = ALIGN(32 / 8);
176 _end = .; PROVIDE (end = .);
177 /* Stabs debugging sections. */
178 .stab 0 : { *(.stab) }
179 .stabstr 0 : { *(.stabstr) }
180 .stab.excl 0 : { *(.stab.excl) }
181 .stab.exclstr 0 : { *(.stab.exclstr) }
182 .stab.index 0 : { *(.stab.index) }
183 .stab.indexstr 0 : { *(.stab.indexstr) }
184 .comment 0 : { *(.comment) }
185 /* DWARF debug sections.
186 Symbols in the DWARF debugging sections are relative to the beginning
187 of the section so we begin them at 0. */
188 /* DWARF 1 */
189 .debug 0 : { *(.debug) }
190 .line 0 : { *(.line) }
191 /* GNU DWARF 1 extensions */
192 .debug_srcinfo 0 : { *(.debug_srcinfo) }
193 .debug_sfnames 0 : { *(.debug_sfnames) }
194 /* DWARF 1.1 and DWARF 2 */
195 .debug_aranges 0 : { *(.debug_aranges) }
196 .debug_pubnames 0 : { *(.debug_pubnames) }
197 /* DWARF 2 */
198 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
199 .debug_abbrev 0 : { *(.debug_abbrev) }
200 .debug_line 0 : { *(.debug_line) }
201 .debug_frame 0 : { *(.debug_frame) }
202 .debug_str 0 : { *(.debug_str) }
203 .debug_loc 0 : { *(.debug_loc) }
204 .debug_macinfo 0 : { *(.debug_macinfo) }
205 /* SGI/MIPS DWARF 2 extensions */
206 .debug_weaknames 0 : { *(.debug_weaknames) }
207 .debug_funcnames 0 : { *(.debug_funcnames) }
208 .debug_typenames 0 : { *(.debug_typenames) }
209 .debug_varnames 0 : { *(.debug_varnames) }
210 /DISCARD/ : { *(.note.GNU-stack) }
211 }