1 /* Script for --shared -z combreloc: shared library, combine & sort relocs */
2 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
4 OUTPUT_ARCH(i386:x86-64)
9 /* Read-only sections, merged into text segment: */
10 . = 0 + SIZEOF_HEADERS;
11 .note.gnu.build-id : { *(.note.gnu.build-id) }
13 .gnu.hash : { *(.gnu.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) }
22 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
24 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
25 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
26 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
27 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
31 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
32 *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*)
33 *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*)
34 *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*)
47 .plt : { *(.plt) *(.iplt) }
50 *(.text.unlikely .text.*_unlikely)
51 *(.text.exit .text.exit.*)
52 *(.text.startup .text.startup.*)
53 *(.text.hot .text.hot.*)
54 *(.text .stub .text.* .gnu.linkonce.t.*)
55 KEEP (*(.text.*personality*))
56 /* .gnu.warning sections are handled specially by elf32.em. */
63 PROVIDE (__etext = .);
66 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
67 .rodata1 : { *(.rodata1) }
68 .eh_frame_hdr : { *(.eh_frame_hdr) }
69 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
70 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table
71 .gcc_except_table.*) }
72 /* These sections are generated by the Sun/Oracle C++ compiler. */
73 .exception_ranges : ONLY_IF_RO { *(.exception_ranges
75 /* Adjust the address for the data segment. We want to adjust up to
76 the same address within the page on the next page up. */
77 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
79 /* Exception handling */
80 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
81 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
82 .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
83 /* Thread Local Storage sections */
84 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
85 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
88 KEEP (*(.preinit_array))
92 KEEP (*(SORT(.init_array.*)))
98 KEEP (*(SORT(.fini_array.*)))
102 /* gcc uses crtbegin.o to find the start of
103 the constructors, so we make sure it is
104 first. Because this is a wildcard, it
105 doesn't matter if the user does not
106 actually link against crtbegin.o; the
107 linker won't look for a file to match a
108 wildcard. The wildcard also means that it
109 doesn't matter which directory crtbegin.o
111 KEEP (*crtbegin.o(.ctors))
112 KEEP (*crtbegin?.o(.ctors))
113 /* We don't want to include the .ctor section from
114 the crtend.o file until after the sorted ctors.
115 The .ctor section from the crtend file contains the
116 end of ctors marker and it must be last */
117 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
118 KEEP (*(SORT(.ctors.*)))
123 KEEP (*crtbegin.o(.dtors))
124 KEEP (*crtbegin?.o(.dtors))
125 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
126 KEEP (*(SORT(.dtors.*)))
129 .jcr : { KEEP (*(.jcr)) }
130 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
131 .dynamic : { *(.dynamic) }
132 .got : { *(.got) *(.igot) }
133 . = DATA_SEGMENT_RELRO_END (24, .);
134 .got.plt : { *(.got.plt) *(.igot.plt) }
137 *(.data .data.* .gnu.linkonce.d.*)
138 KEEP (*(.gnu.linkonce.d.*personality*))
141 .data1 : { *(.data1) }
142 _edata = .; PROVIDE (edata = .);
147 *(.bss .bss.* .gnu.linkonce.b.*)
149 /* Align here to ensure that the .bss section occupies space up to
150 _end. Align after .bss to ensure correct alignment even if the
151 .bss section disappears because there are no input sections.
152 FIXME: Why do we need it? When there is no .bss section, we don't
153 pad the .data section. */
154 . = ALIGN(. != 0 ? 64 / 8 : 1);
159 *(.lbss .lbss.* .gnu.linkonce.lb.*)
163 .lrodata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
165 *(.lrodata .lrodata.* .gnu.linkonce.lr.*)
167 .ldata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
169 *(.ldata .ldata.* .gnu.linkonce.l.*)
170 . = ALIGN(. != 0 ? 64 / 8 : 1);
173 _end = .; PROVIDE (end = .);
174 . = DATA_SEGMENT_END (.);
175 /* Stabs debugging sections. */
176 .stab 0 : { *(.stab) }
177 .stabstr 0 : { *(.stabstr) }
178 .stab.excl 0 : { *(.stab.excl) }
179 .stab.exclstr 0 : { *(.stab.exclstr) }
180 .stab.index 0 : { *(.stab.index) }
181 .stab.indexstr 0 : { *(.stab.indexstr) }
182 .comment 0 : { *(.comment) }
183 /* DWARF debug sections.
184 Symbols in the DWARF debugging sections are relative to the beginning
185 of the section so we begin them at 0. */
187 .debug 0 : { *(.debug) }
188 .line 0 : { *(.line) }
189 /* GNU DWARF 1 extensions */
190 .debug_srcinfo 0 : { *(.debug_srcinfo) }
191 .debug_sfnames 0 : { *(.debug_sfnames) }
192 /* DWARF 1.1 and DWARF 2 */
193 .debug_aranges 0 : { *(.debug_aranges) }
194 .debug_pubnames 0 : { *(.debug_pubnames) }
196 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
197 .debug_abbrev 0 : { *(.debug_abbrev) }
198 .debug_line 0 : { *(.debug_line) }
199 .debug_frame 0 : { *(.debug_frame) }
200 .debug_str 0 : { *(.debug_str) }
201 .debug_loc 0 : { *(.debug_loc) }
202 .debug_macinfo 0 : { *(.debug_macinfo) }
203 /* SGI/MIPS DWARF 2 extensions */
204 .debug_weaknames 0 : { *(.debug_weaknames) }
205 .debug_funcnames 0 : { *(.debug_funcnames) }
206 .debug_typenames 0 : { *(.debug_typenames) }
207 .debug_varnames 0 : { *(.debug_varnames) }
209 .debug_pubtypes 0 : { *(.debug_pubtypes) }
210 .debug_ranges 0 : { *(.debug_ranges) }
211 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
212 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }