]>
Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | # |
2 | # Unusual variables checked by this code: | |
563e308f | 3 | # NOP - four byte opcode for no-op (defaults to 0) |
48459341 L |
4 | # NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not |
5 | # empty. | |
252b5132 RH |
6 | # DATA_ADDR - if end-of-text-plus-one-page isn't right for data start |
7 | # INITIAL_READONLY_SECTIONS - at start of text segment | |
8 | # OTHER_READONLY_SECTIONS - other than .text .init .rodata ... | |
9 | # (e.g., .PARISC.milli) | |
10 | # OTHER_TEXT_SECTIONS - these get put in .text when relocating | |
11 | # OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... | |
12 | # (e.g., .PARISC.global) | |
904ecb2d | 13 | # OTHER_BSS_SECTIONS - other than .bss .sbss ... |
252b5132 RH |
14 | # OTHER_SECTIONS - at the end |
15 | # EXECUTABLE_SYMBOLS - symbols that must be defined for an | |
16 | # executable (e.g., _DYNAMIC_LINK) | |
17 | # TEXT_START_SYMBOLS - symbols that appear at the start of the | |
18 | # .text section. | |
19 | # DATA_START_SYMBOLS - symbols that appear at the start of the | |
20 | # .data section. | |
21 | # OTHER_GOT_SYMBOLS - symbols defined just before .got. | |
5253f23b AM |
22 | # OTHER_GOT_SECTIONS - sections just after .got. |
23 | # OTHER_SDATA_SECTIONS - sections just after .sdata. | |
252b5132 RH |
24 | # OTHER_BSS_SYMBOLS - symbols that appear at the start of the |
25 | # .bss section besides __bss_start. | |
26 | # DATA_PLT - .plt should be in data segment, not text segment. | |
6c86c541 | 27 | # BSS_PLT - .plt should be in bss segment |
252b5132 RH |
28 | # TEXT_DYNAMIC - .dynamic in text segment, not data segment. |
29 | # EMBEDDED - whether this is for an embedded system. | |
30 | # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set | |
31 | # start address of shared library. | |
32 | # INPUT_FILES - INPUT command of files to always include | |
a8e53fb0 | 33 | # WRITABLE_RODATA - if set, the .rodata section should be writable |
904ecb2d JL |
34 | # INIT_START, INIT_END - statements just before and just after |
35 | # combination of .init sections. | |
36 | # FINI_START, FINI_END - statements just before and just after | |
37 | # combination of .fini sections. | |
465bc359 AM |
38 | # STACK_ADDR - start of a .stack section. |
39 | # OTHER_END_SYMBOLS - symbols to place right at the end of the script. | |
252b5132 RH |
40 | # |
41 | # When adding sections, do note that the names of some sections are used | |
42 | # when specifying the start address of the next. | |
43 | # | |
44 | ||
d73e9da0 AS |
45 | # Many sections come in three flavours. There is the 'real' section, |
46 | # like ".data". Then there are the per-procedure or per-variable | |
47 | # sections, generated by -ffunction-sections and -fdata-sections in GCC, | |
48 | # and useful for --gc-sections, which for a variable "foo" might be | |
49 | # ".data.foo". Then there are the linkonce sections, for which the linker | |
50 | # eliminates duplicates, which are named like ".gnu.linkonce.d.foo". | |
51 | # The exact correspondences are: | |
52 | # | |
53 | # Section Linkonce section | |
54 | # .text .gnu.linkonce.t.foo | |
55 | # .rodata .gnu.linkonce.r.foo | |
56 | # .data .gnu.linkonce.d.foo | |
57 | # .bss .gnu.linkonce.b.foo | |
58 | # .sdata .gnu.linkonce.s.foo | |
59 | # .sbss .gnu.linkonce.sb.foo | |
60 | # .sdata2 .gnu.linkonce.s2.foo | |
61 | # .sbss2 .gnu.linkonce.sb2.foo | |
465bc359 | 62 | # .debug_info .gnu.linkonce.wi.foo |
13ae64f3 JJ |
63 | # .tdata .gnu.linkonce.td.foo |
64 | # .tbss .gnu.linkonce.tb.foo | |
d73e9da0 AS |
65 | # |
66 | # Each of these can also have corresponding .rel.* and .rela.* sections. | |
9ac4db9c | 67 | |
252b5132 RH |
68 | test -z "$ENTRY" && ENTRY=_start |
69 | test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} | |
70 | test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} | |
71 | if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi | |
72 | test -z "${ELFSIZE}" && ELFSIZE=32 | |
73 | test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" | |
74 | test "$LD_FLAG" = "N" && DATA_ADDR=. | |
9203ba99 JJ |
75 | test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE="" |
76 | test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE="" | |
1ddd7b13 | 77 | DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))" |
2d13d8c5 JJ |
78 | DATA_SEGMENT_END="" |
79 | if test -n "${COMMONPAGESIZE}"; then | |
1ddd7b13 | 80 | DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})" |
2d13d8c5 | 81 | DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);" |
2d20f7bf | 82 | fi |
465bc359 AM |
83 | INTERP=".interp ${RELOCATING-0} : { *(.interp) }" |
84 | PLT=".plt ${RELOCATING-0} : { *(.plt) }" | |
68f8ff14 | 85 | test -z "$GOT" && GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }" |
465bc359 AM |
86 | DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" |
87 | RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" | |
9ee5e499 | 88 | STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }" |
48459341 L |
89 | if test -z "${NO_SMALL_DATA}"; then |
90 | SBSS=".sbss ${RELOCATING-0} : | |
91 | { | |
92 | ${RELOCATING+PROVIDE (__sbss_start = .);} | |
93 | ${RELOCATING+PROVIDE (___sbss_start = .);} | |
94 | *(.dynsbss) | |
95 | *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*}) | |
96 | *(.scommon) | |
97 | ${RELOCATING+PROVIDE (__sbss_end = .);} | |
98 | ${RELOCATING+PROVIDE (___sbss_end = .);} | |
99 | }" | |
100 | SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" | |
101 | SDATA="/* We want the small data sections together, so single-instruction offsets | |
102 | can access them all, and initialized data all before uninitialized, so | |
103 | we can shorten the on-disk segment size. */ | |
104 | .sdata ${RELOCATING-0} : | |
105 | { | |
106 | ${RELOCATING+${SDATA_START_SYMBOLS}} | |
107 | *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) | |
108 | }" | |
109 | SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }" | |
110 | REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) } | |
111 | .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }" | |
112 | REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) } | |
113 | .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }" | |
114 | REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) } | |
115 | .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }" | |
116 | REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } | |
117 | .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" | |
118 | fi | |
465bc359 | 119 | CTOR=".ctors ${CONSTRUCTING-0} : |
252b5132 RH |
120 | { |
121 | ${CONSTRUCTING+${CTOR_START}} | |
122 | /* gcc uses crtbegin.o to find the start of | |
123 | the constructors, so we make sure it is | |
124 | first. Because this is a wildcard, it | |
125 | doesn't matter if the user does not | |
126 | actually link against crtbegin.o; the | |
127 | linker won't look for a file to match a | |
128 | wildcard. The wildcard also means that it | |
129 | doesn't matter which directory crtbegin.o | |
130 | is in. */ | |
131 | ||
877d60f7 | 132 | KEEP (*crtbegin*.o(.ctors)) |
252b5132 RH |
133 | |
134 | /* We don't want to include the .ctor section from | |
135 | from the crtend.o file until after the sorted ctors. | |
136 | The .ctor section from the crtend file contains the | |
137 | end of ctors marker and it must be last */ | |
138 | ||
877d60f7 | 139 | KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors)) |
252b5132 RH |
140 | KEEP (*(SORT(.ctors.*))) |
141 | KEEP (*(.ctors)) | |
142 | ${CONSTRUCTING+${CTOR_END}} | |
143 | }" | |
465bc359 | 144 | DTOR=".dtors ${CONSTRUCTING-0} : |
252b5132 RH |
145 | { |
146 | ${CONSTRUCTING+${DTOR_START}} | |
877d60f7 AM |
147 | KEEP (*crtbegin*.o(.dtors)) |
148 | KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors)) | |
252b5132 RH |
149 | KEEP (*(SORT(.dtors.*))) |
150 | KEEP (*(.dtors)) | |
151 | ${CONSTRUCTING+${DTOR_END}} | |
152 | }" | |
465bc359 AM |
153 | STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : |
154 | { | |
155 | ${RELOCATING+_stack = .;} | |
156 | *(.stack) | |
157 | }" | |
252b5132 RH |
158 | |
159 | # if this is for an embedded system, don't add SIZEOF_HEADERS. | |
160 | if [ -z "$EMBEDDED" ]; then | |
161 | test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS" | |
162 | else | |
163 | test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}" | |
164 | fi | |
165 | ||
166 | cat <<EOF | |
167 | OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", | |
168 | "${LITTLE_OUTPUT_FORMAT}") | |
169 | OUTPUT_ARCH(${OUTPUT_ARCH}) | |
170 | ENTRY(${ENTRY}) | |
171 | ||
172 | ${RELOCATING+${LIB_SEARCH_DIRS}} | |
173 | ${RELOCATING+/* Do we need any of these for elf? | |
174 | __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */} | |
175 | ${RELOCATING+${EXECUTABLE_SYMBOLS}} | |
176 | ${RELOCATING+${INPUT_FILES}} | |
177 | ${RELOCATING- /* For some reason, the Solaris linker makes bad executables | |
178 | if gld -r is used and the intermediate file has sections starting | |
179 | at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld | |
180 | bug. But for now assigning the zero vmas works. */} | |
181 | ||
182 | SECTIONS | |
183 | { | |
184 | /* Read-only sections, merged into text segment: */ | |
36af4a4e | 185 | ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${TEXT_BASE_ADDRESS};}}} |
252b5132 | 186 | ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}} |
36af4a4e | 187 | ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}} |
252b5132 RH |
188 | ${CREATE_SHLIB-${INTERP}} |
189 | ${INITIAL_READONLY_SECTIONS} | |
190 | ${TEXT_DYNAMIC+${DYNAMIC}} | |
465bc359 AM |
191 | .hash ${RELOCATING-0} : { *(.hash) } |
192 | .dynsym ${RELOCATING-0} : { *(.dynsym) } | |
193 | .dynstr ${RELOCATING-0} : { *(.dynstr) } | |
194 | .gnu.version ${RELOCATING-0} : { *(.gnu.version) } | |
195 | .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) } | |
196 | .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) } | |
9e4141bc | 197 | |
db6751f2 JJ |
198 | EOF |
199 | if [ "x$COMBRELOC" = x ]; then | |
200 | COMBRELOCCAT=cat | |
201 | else | |
202 | COMBRELOCCAT="cat > $COMBRELOC" | |
203 | fi | |
204 | eval $COMBRELOCCAT <<EOF | |
465bc359 AM |
205 | .rel.init ${RELOCATING-0} : { *(.rel.init) } |
206 | .rela.init ${RELOCATING-0} : { *(.rela.init) } | |
207 | .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) } | |
208 | .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) } | |
209 | .rel.fini ${RELOCATING-0} : { *(.rel.fini) } | |
210 | .rela.fini ${RELOCATING-0} : { *(.rela.fini) } | |
211 | .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) } | |
212 | .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) } | |
9e4141bc | 213 | ${OTHER_READONLY_RELOC_SECTIONS} |
465bc359 AM |
214 | .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) } |
215 | .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) } | |
13ae64f3 JJ |
216 | .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) } |
217 | .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) } | |
218 | .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) } | |
219 | .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) } | |
465bc359 AM |
220 | .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) } |
221 | .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) } | |
222 | .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) } | |
223 | .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) } | |
224 | .rel.got ${RELOCATING-0} : { *(.rel.got) } | |
225 | .rela.got ${RELOCATING-0} : { *(.rela.got) } | |
9e4141bc | 226 | ${OTHER_GOT_RELOC_SECTIONS} |
48459341 L |
227 | ${REL_SDATA} |
228 | ${REL_SBSS} | |
229 | ${REL_SDATA2} | |
230 | ${REL_SBSS2} | |
465bc359 AM |
231 | .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) } |
232 | .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) } | |
db6751f2 JJ |
233 | EOF |
234 | if [ -n "$COMBRELOC" ]; then | |
235 | cat <<EOF | |
465bc359 | 236 | .rel.dyn ${RELOCATING-0} : |
db6751f2 JJ |
237 | { |
238 | EOF | |
239 | sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC | |
240 | cat <<EOF | |
241 | } | |
465bc359 | 242 | .rela.dyn ${RELOCATING-0} : |
db6751f2 JJ |
243 | { |
244 | EOF | |
245 | sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC | |
246 | cat <<EOF | |
247 | } | |
248 | EOF | |
249 | fi | |
250 | cat <<EOF | |
465bc359 AM |
251 | .rel.plt ${RELOCATING-0} : { *(.rel.plt) } |
252 | .rela.plt ${RELOCATING-0} : { *(.rela.plt) } | |
9e673ad1 | 253 | ${OTHER_PLT_RELOC_SECTIONS} |
9e4141bc | 254 | |
465bc359 | 255 | .init ${RELOCATING-0} : |
4ab10e93 | 256 | { |
53db15ed | 257 | ${RELOCATING+${INIT_START}} |
4ab10e93 | 258 | KEEP (*(.init)) |
53db15ed | 259 | ${RELOCATING+${INIT_END}} |
4ab10e93 GK |
260 | } =${NOP-0} |
261 | ||
6c86c541 | 262 | ${DATA_PLT-${BSS_PLT-${PLT}}} |
465bc359 | 263 | .text ${RELOCATING-0} : |
252b5132 RH |
264 | { |
265 | ${RELOCATING+${TEXT_START_SYMBOLS}} | |
465bc359 | 266 | *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) |
252b5132 RH |
267 | /* .gnu.warning sections are handled specially by elf32.em. */ |
268 | *(.gnu.warning) | |
252b5132 RH |
269 | ${RELOCATING+${OTHER_TEXT_SECTIONS}} |
270 | } =${NOP-0} | |
465bc359 | 271 | .fini ${RELOCATING-0} : |
904ecb2d | 272 | { |
53db15ed | 273 | ${RELOCATING+${FINI_START}} |
904ecb2d | 274 | KEEP (*(.fini)) |
53db15ed | 275 | ${RELOCATING+${FINI_END}} |
904ecb2d | 276 | } =${NOP-0} |
6c86c541 GK |
277 | ${RELOCATING+PROVIDE (__etext = .);} |
278 | ${RELOCATING+PROVIDE (_etext = .);} | |
279 | ${RELOCATING+PROVIDE (etext = .);} | |
a8e53fb0 | 280 | ${WRITABLE_RODATA-${RODATA}} |
465bc359 | 281 | .rodata1 ${RELOCATING-0} : { *(.rodata1) } |
6c86c541 GK |
282 | ${CREATE_SHLIB-${SDATA2}} |
283 | ${CREATE_SHLIB-${SBSS2}} | |
465bc359 | 284 | ${OTHER_READONLY_SECTIONS} |
65765700 | 285 | .eh_frame_hdr : { *(.eh_frame_hdr) } |
252b5132 RH |
286 | |
287 | /* Adjust the address for the data segment. We want to adjust up to | |
288 | the same address within the page on the next page up. */ | |
9203ba99 | 289 | ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}} |
2d20f7bf | 290 | ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} |
9203ba99 | 291 | ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} |
252b5132 | 292 | |
b5090659 L |
293 | /* Ensure the __preinit_array_start label is properly aligned. We |
294 | could instead move the label definition inside the section, but | |
295 | the linker would then create the section even if it turns out to | |
296 | be empty, which isn't pretty. */ | |
297 | ${RELOCATING+. = ALIGN(${ALIGNMENT});} | |
298 | ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}} | |
299 | .preinit_array ${RELOCATING-0} : { *(.preinit_array) } | |
300 | ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}} | |
301 | ||
302 | ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}} | |
303 | .init_array ${RELOCATING-0} : { *(.init_array) } | |
304 | ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}} | |
305 | ||
306 | ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}} | |
307 | .fini_array ${RELOCATING-0} : { *(.fini_array) } | |
308 | ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}} | |
309 | ||
465bc359 | 310 | .data ${RELOCATING-0} : |
252b5132 RH |
311 | { |
312 | ${RELOCATING+${DATA_START_SYMBOLS}} | |
465bc359 | 313 | *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*}) |
252b5132 RH |
314 | ${CONSTRUCTING+SORT(CONSTRUCTORS)} |
315 | } | |
465bc359 | 316 | .data1 ${RELOCATING-0} : { *(.data1) } |
13ae64f3 | 317 | .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } |
f13a5424 | 318 | .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } |
465bc359 AM |
319 | .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) } |
320 | .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) } | |
a8e53fb0 | 321 | ${WRITABLE_RODATA+${RODATA}} |
465bc359 | 322 | ${OTHER_READWRITE_SECTIONS} |
5253f23b | 323 | ${TEXT_DYNAMIC-${DYNAMIC}} |
252b5132 RH |
324 | ${RELOCATING+${CTOR}} |
325 | ${RELOCATING+${DTOR}} | |
465bc359 | 326 | .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) } |
252b5132 RH |
327 | ${DATA_PLT+${PLT}} |
328 | ${RELOCATING+${OTHER_GOT_SYMBOLS}} | |
68f8ff14 | 329 | ${GOT} |
465bc359 | 330 | ${OTHER_GOT_SECTIONS} |
6c86c541 GK |
331 | ${CREATE_SHLIB+${SDATA2}} |
332 | ${CREATE_SHLIB+${SBSS2}} | |
48459341 | 333 | ${SDATA} |
465bc359 | 334 | ${OTHER_SDATA_SECTIONS} |
9e4141bc | 335 | ${RELOCATING+_edata = .;} |
252b5132 RH |
336 | ${RELOCATING+PROVIDE (edata = .);} |
337 | ${RELOCATING+__bss_start = .;} | |
338 | ${RELOCATING+${OTHER_BSS_SYMBOLS}} | |
48459341 | 339 | ${SBSS} |
6c86c541 | 340 | ${BSS_PLT+${PLT}} |
465bc359 | 341 | .bss ${RELOCATING-0} : |
252b5132 RH |
342 | { |
343 | *(.dynbss) | |
465bc359 | 344 | *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) |
252b5132 RH |
345 | *(COMMON) |
346 | /* Align here to ensure that the .bss section occupies space up to | |
347 | _end. Align after .bss to ensure correct alignment even if the | |
348 | .bss section disappears because there are no input sections. */ | |
349 | ${RELOCATING+. = ALIGN(${ALIGNMENT});} | |
350 | } | |
465bc359 | 351 | ${OTHER_BSS_SECTIONS} |
252b5132 | 352 | ${RELOCATING+. = ALIGN(${ALIGNMENT});} |
9e4141bc | 353 | ${RELOCATING+_end = .;} |
252b5132 RH |
354 | ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} |
355 | ${RELOCATING+PROVIDE (end = .);} | |
2d13d8c5 | 356 | ${RELOCATING+${DATA_SEGMENT_END}} |
252b5132 RH |
357 | |
358 | /* Stabs debugging sections. */ | |
465bc359 AM |
359 | .stab 0 : { *(.stab) } |
360 | .stabstr 0 : { *(.stabstr) } | |
361 | .stab.excl 0 : { *(.stab.excl) } | |
362 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
363 | .stab.index 0 : { *(.stab.index) } | |
252b5132 RH |
364 | .stab.indexstr 0 : { *(.stab.indexstr) } |
365 | ||
465bc359 | 366 | .comment 0 : { *(.comment) } |
252b5132 RH |
367 | |
368 | /* DWARF debug sections. | |
369 | Symbols in the DWARF debugging sections are relative to the beginning | |
370 | of the section so we begin them at 0. */ | |
371 | ||
372 | /* DWARF 1 */ | |
373 | .debug 0 : { *(.debug) } | |
374 | .line 0 : { *(.line) } | |
375 | ||
376 | /* GNU DWARF 1 extensions */ | |
377 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
378 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
379 | ||
380 | /* DWARF 1.1 and DWARF 2 */ | |
381 | .debug_aranges 0 : { *(.debug_aranges) } | |
382 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
383 | ||
384 | /* DWARF 2 */ | |
465bc359 | 385 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } |
252b5132 RH |
386 | .debug_abbrev 0 : { *(.debug_abbrev) } |
387 | .debug_line 0 : { *(.debug_line) } | |
388 | .debug_frame 0 : { *(.debug_frame) } | |
389 | .debug_str 0 : { *(.debug_str) } | |
390 | .debug_loc 0 : { *(.debug_loc) } | |
391 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
392 | ||
393 | /* SGI/MIPS DWARF 2 extensions */ | |
394 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
395 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
396 | .debug_typenames 0 : { *(.debug_typenames) } | |
397 | .debug_varnames 0 : { *(.debug_varnames) } | |
398 | ||
465bc359 | 399 | ${STACK_ADDR+${STACK}} |
252b5132 | 400 | ${OTHER_SECTIONS} |
465bc359 | 401 | ${RELOCATING+${OTHER_END_SYMBOLS}} |
9ee5e499 | 402 | ${RELOCATING+${STACKNOTE}} |
252b5132 RH |
403 | } |
404 | EOF |