]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/testsuite/ld-shared/elf-offset.ld
19990502 sourceware import
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-shared / elf-offset.ld
1 SECTIONS
2 {
3 /* Read-only sections, merged into text segment: */
4 . = 0x100000;
5 .hash : { *(.hash) }
6 .dynsym : { *(.dynsym) }
7 .dynstr : { *(.dynstr) }
8 .gnu.version : { *(.gnu.version) }
9 .gnu.version_d : { *(.gnu.version_d) }
10 .gnu.version_r : { *(.gnu.version_r) }
11 .rel.text :
12 {
13 *(.rel.text)
14 *(.rel.text.*)
15 *(.rel.gnu.linkonce.t*)
16 }
17 .rela.text :
18 {
19 *(.rela.text)
20 *(.rela.text.*)
21 *(.rela.gnu.linkonce.t*)
22 }
23 .rel.data :
24 {
25 *(.rel.data)
26 *(.rel.data.*)
27 *(.rel.gnu.linkonce.d*)
28 }
29 .rela.data :
30 {
31 *(.rela.data)
32 *(.rela.data.*)
33 *(.rela.gnu.linkonce.d*)
34 }
35 .rel.rodata :
36 {
37 *(.rel.rodata)
38 *(.rel.rodata.*)
39 *(.rel.gnu.linkonce.r*)
40 }
41 .rela.rodata :
42 {
43 *(.rela.rodata)
44 *(.rela.rodata.*)
45 *(.rela.gnu.linkonce.r*)
46 }
47 .rel.got : { *(.rel.got) }
48 .rela.got : { *(.rela.got) }
49 .rel.ctors : { *(.rel.ctors) }
50 .rela.ctors : { *(.rela.ctors) }
51 .rel.dtors : { *(.rel.dtors) }
52 .rela.dtors : { *(.rela.dtors) }
53 .rel.init : { *(.rel.init) }
54 .rela.init : { *(.rela.init) }
55 .rel.fini : { *(.rel.fini) }
56 .rela.fini : { *(.rela.fini) }
57 .rel.bss : { *(.rel.bss) }
58 .rela.bss : { *(.rela.bss) }
59 .rel.plt : { *(.rel.plt) }
60 .rela.plt : { *(.rela.plt) }
61 .init : { KEEP (*(.init)) }
62 .plt : { *(.plt) }
63 .text :
64 {
65 *(.text)
66 *(.text.*)
67 *(.stub)
68 /* .gnu.warning sections are handled specially by elf32.em. */
69 *(.gnu.warning)
70 *(.gnu.linkonce.t*)
71 }
72 _etext = .;
73 PROVIDE (etext = .);
74 .fini : { KEEP (*(.fini)) } =0x9090
75 .rodata :
76 {
77 *(.rodata)
78 *(.rodata.*)
79 *(.gnu.linkonce.r*)
80 }
81 .rodata1 : { *(.rodata1) }
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. */
84 . = ALIGN(0x1000) + (. & (0x1000 - 1));
85 .data :
86 {
87 *(.data)
88 *(.data.*)
89 *(.gnu.linkonce.d*)
90 SORT(CONSTRUCTORS)
91 }
92 .data1 : { *(.data1) }
93 .ctors :
94 {
95 /* gcc uses crtbegin.o to find the start of the constructors, so
96 we make sure it is first. Because this is a wildcard, it
97 doesn't matter if the user does not actually link against
98 crtbegin.o; the linker won't look for a file to match a
99 wildcard. The wildcard also means that it doesn't matter which
100 directory crtbegin.o is in. */
101 KEEP (*crtbegin.o(.ctors))
102 KEEP (*(SORT(.ctors.*)))
103 KEEP (*(.ctors))
104 }
105 .dtors :
106 {
107 KEEP (*crtbegin.o(.dtors))
108 KEEP (*(SORT(.dtors.*)))
109 KEEP (*(.dtors))
110 }
111 .got : { *(.got.plt) *(.got) }
112 .dynamic : { *(.dynamic) }
113 /* We want the small data sections together, so single-instruction offsets
114 can access them all, and initialized data all before uninitialized, so
115 we can shorten the on-disk segment size. */
116 .sdata : { *(.sdata) *(.sdata.*) }
117 _edata = .;
118 PROVIDE (edata = .);
119 __bss_start = .;
120 .sbss : { *(.sbss) *(.scommon) }
121 .bss :
122 {
123 *(.dynbss)
124 *(.bss)
125 *(COMMON)
126 /* Align here to ensure that the .bss section occupies space up to
127 _end. Align after .bss to ensure correct alignment even if the
128 .bss section disappears because there are no input sections. */
129 . = ALIGN(32 / 8);
130 }
131 . = ALIGN(32 / 8);
132 _end = . ;
133 PROVIDE (end = .);
134 /* Stabs debugging sections. */
135 .stab 0 : { *(.stab) }
136 .stabstr 0 : { *(.stabstr) }
137 .stab.excl 0 : { *(.stab.excl) }
138 .stab.exclstr 0 : { *(.stab.exclstr) }
139 .stab.index 0 : { *(.stab.index) }
140 .stab.indexstr 0 : { *(.stab.indexstr) }
141 .comment 0 : { *(.comment) }
142 /* DWARF debug sections.
143 Symbols in the DWARF debugging sections are relative to the beginning
144 of the section so we begin them at 0. */
145 /* DWARF 1 */
146 .debug 0 : { *(.debug) }
147 .line 0 : { *(.line) }
148 /* GNU DWARF 1 extensions */
149 .debug_srcinfo 0 : { *(.debug_srcinfo) }
150 .debug_sfnames 0 : { *(.debug_sfnames) }
151 /* DWARF 1.1 and DWARF 2 */
152 .debug_aranges 0 : { *(.debug_aranges) }
153 .debug_pubnames 0 : { *(.debug_pubnames) }
154 /* DWARF 2 */
155 .debug_info 0 : { *(.debug_info) }
156 .debug_abbrev 0 : { *(.debug_abbrev) }
157 .debug_line 0 : { *(.debug_line) }
158 .debug_frame 0 : { *(.debug_frame) }
159 .debug_str 0 : { *(.debug_str) }
160 .debug_loc 0 : { *(.debug_loc) }
161 .debug_macinfo 0 : { *(.debug_macinfo) }
162 /* SGI/MIPS DWARF 2 extensions */
163 .debug_weaknames 0 : { *(.debug_weaknames) }
164 .debug_funcnames 0 : { *(.debug_funcnames) }
165 .debug_typenames 0 : { *(.debug_typenames) }
166 .debug_varnames 0 : { *(.debug_varnames) }
167 /* These must appear regardless of . */
168 }