1 OUTPUT_FORMAT("elf64-x86-64")
\r
2 /* OUTPUT_ARCH(x86_64) */
\r
8 /* Read-only sections, merged into text segment: */
\r
9 PROVIDE (__executable_start = 0x00400000); . = 0x00400000 + SIZEOF_HEADERS;
\r
10 .interp : { *(.interp) }
\r
11 .note.gnu.build-id : { *(.note.gnu.build-id) }
\r
12 .hash : { *(.hash) }
\r
13 .gnu.hash : { *(.gnu.hash) }
\r
14 .dynsym : { *(.dynsym) }
\r
15 .dynstr : { *(.dynstr) }
\r
16 .gnu.version : { *(.gnu.version) }
\r
17 .gnu.version_d : { *(.gnu.version_d) }
\r
18 .gnu.version_r : { *(.gnu.version_r) }
\r
22 *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
\r
24 *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
\r
25 *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
\r
26 *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
\r
27 *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
\r
28 *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
\r
32 *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
\r
37 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
\r
39 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
\r
40 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
\r
41 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
\r
42 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
\r
46 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
\r
48 .rel.plt : { *(.rel.plt) }
\r
49 .rela.plt : { *(.rela.plt) }
\r
57 *(.text .stub .text.* .gnu.linkonce.t.*)
\r
58 /* .gnu.warning sections are handled specially by elf32.em. */
\r
65 PROVIDE (__etext = .);
\r
66 PROVIDE (_etext = .);
\r
67 PROVIDE (etext = .);
\r
68 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
\r
69 .rodata1 : { *(.rodata1) }
\r
70 .eh_frame_hdr : { *(.eh_frame_hdr) }
\r
71 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
\r
72 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
\r
73 /* Adjust the address for the data segment. We want to adjust up to
\r
74 the same address within the page on the next page up. */
\r
75 . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
\r
76 /* Exception handling */
\r
77 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
\r
78 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
\r
79 /* Thread Local Storage sections */
\r
80 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
\r
81 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
\r
84 PROVIDE_HIDDEN (__preinit_array_start = .);
\r
85 KEEP (*(.preinit_array))
\r
86 PROVIDE_HIDDEN (__preinit_array_end = .);
\r
90 PROVIDE_HIDDEN (__init_array_start = .);
\r
91 KEEP (*(SORT(.init_array.*)))
\r
92 KEEP (*(.init_array))
\r
93 PROVIDE_HIDDEN (__init_array_end = .);
\r
97 PROVIDE_HIDDEN (__fini_array_start = .);
\r
98 KEEP (*(.fini_array))
\r
99 KEEP (*(SORT(.fini_array.*)))
\r
100 PROVIDE_HIDDEN (__fini_array_end = .);
\r
104 /* gcc uses crtbegin.o to find the start of
\r
105 the constructors, so we make sure it is
\r
106 first. Because this is a wildcard, it
\r
107 doesn't matter if the user does not
\r
108 actually link against crtbegin.o; the
\r
109 linker won't look for a file to match a
\r
110 wildcard. The wildcard also means that it
\r
111 doesn't matter which directory crtbegin.o
\r
113 KEEP (*crtbegin.o(.ctors))
\r
114 KEEP (*crtbegin?.o(.ctors))
\r
115 /* We don't want to include the .ctor section from
\r
116 the crtend.o file until after the sorted ctors.
\r
117 The .ctor section from the crtend file contains the
\r
118 end of ctors marker and it must be last */
\r
119 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
\r
120 KEEP (*(SORT(.ctors.*)))
\r
125 KEEP (*crtbegin.o(.dtors))
\r
126 KEEP (*crtbegin?.o(.dtors))
\r
127 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
\r
128 KEEP (*(SORT(.dtors.*)))
\r
131 .jcr : { KEEP (*(.jcr)) }
\r
132 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
\r
133 .dynamic : { *(.dynamic) }
\r
135 . = DATA_SEGMENT_RELRO_END (12, .);
\r
136 .got.plt : { *(.got.plt) }
\r
139 *(.data .data.* .gnu.linkonce.d.*)
\r
142 .data1 : { *(.data1) }
\r
143 _edata = .; PROVIDE (edata = .);
\r
148 *(.bss .bss.* .gnu.linkonce.b.*)
\r
150 /* Align here to ensure that the .bss section occupies space up to
\r
151 _end. Align after .bss to ensure correct alignment even if the
\r
152 .bss section disappears because there are no input sections.
\r
153 FIXME: Why do we need it? When there is no .bss section, we don't
\r
154 pad the .data section. */
\r
155 . = ALIGN(. != 0 ? 32 / 8 : 1);
\r
159 _end = .; PROVIDE (end = .);
\r
160 . = DATA_SEGMENT_END (.);
\r
161 /* Stabs debugging sections. */
\r
162 .stab 0 : { *(.stab) }
\r
163 .stabstr 0 : { *(.stabstr) }
\r
164 .stab.excl 0 : { *(.stab.excl) }
\r
165 .stab.exclstr 0 : { *(.stab.exclstr) }
\r
166 .stab.index 0 : { *(.stab.index) }
\r
167 .stab.indexstr 0 : { *(.stab.indexstr) }
\r
168 .comment 0 : { *(.comment) }
\r
169 /* DWARF debug sections.
\r
170 Symbols in the DWARF debugging sections are relative to the beginning
\r
171 of the section so we begin them at 0. */
\r
173 .debug 0 : { *(.debug) }
\r
174 .line 0 : { *(.line) }
\r
175 /* GNU DWARF 1 extensions */
\r
176 .debug_srcinfo 0 : { *(.debug_srcinfo) }
\r
177 .debug_sfnames 0 : { *(.debug_sfnames) }
\r
178 /* DWARF 1.1 and DWARF 2 */
\r
179 .debug_aranges 0 : { *(.debug_aranges) }
\r
180 .debug_pubnames 0 : { *(.debug_pubnames) }
\r
182 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
\r
183 .debug_abbrev 0 : { *(.debug_abbrev) }
\r
184 .debug_line 0 : { *(.debug_line) }
\r
185 .debug_frame 0 : { *(.debug_frame) }
\r
186 .debug_str 0 : { *(.debug_str) }
\r
187 .debug_loc 0 : { *(.debug_loc) }
\r
188 .debug_macinfo 0 : { *(.debug_macinfo) }
\r
189 /* SGI/MIPS DWARF 2 extensions */
\r
190 .debug_weaknames 0 : { *(.debug_weaknames) }
\r
191 .debug_funcnames 0 : { *(.debug_funcnames) }
\r
192 .debug_typenames 0 : { *(.debug_typenames) }
\r
193 .debug_varnames 0 : { *(.debug_varnames) }
\r
195 .debug_pubtypes 0 : { *(.debug_pubtypes) }
\r
196 .debug_ranges 0 : { *(.debug_ranges) }
\r
197 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
\r
198 /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
\r