2 OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", "elf64-x86-64-freebsd")
3 OUTPUT_ARCH(i386:x86-64)
5 SEARCH_DIR("/usr/lib");
8 /* Read-only sections, merged into text segment: */
9 . = kernbase + kernload + SIZEOF_HEADERS;
11 * Use the AT keyword in order to set the right LMA that contains
12 * the physical address where the section should be loaded. This is
13 * needed for the Xen loader which honours the LMA.
15 .interp : AT (kernload + SIZEOF_HEADERS) { *(.interp) }
17 .gnu.hash : { *(.gnu.hash) }
18 .dynsym : { *(.dynsym) }
19 .dynstr : { *(.dynstr) }
20 .gnu.version : { *(.gnu.version) }
21 .gnu.version_d : { *(.gnu.version_d) }
22 .gnu.version_r : { *(.gnu.version_r) }
23 .rel.init : { *(.rel.init) }
24 .rela.init : { *(.rela.init) }
25 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
26 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
27 .rel.fini : { *(.rel.fini) }
28 .rela.fini : { *(.rela.fini) }
29 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
30 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
31 .rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
32 .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
33 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
34 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
35 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
36 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
37 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
38 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
39 .rel.ctors : { *(.rel.ctors) }
40 .rela.ctors : { *(.rela.ctors) }
41 .rel.dtors : { *(.rel.dtors) }
42 .rela.dtors : { *(.rela.dtors) }
43 .rel.got : { *(.rel.got) }
44 .rela.got : { *(.rela.got) }
45 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
46 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
47 .rel.plt : { *(.rel.plt) }
48 .rela.plt : { *(.rela.plt) }
56 *(.text .stub .text.* .gnu.linkonce.t.*)
57 KEEP (*(.text.*personality*))
58 /* .gnu.warning sections are handled specially by elf32.em. */
65 PROVIDE (__etext = .);
68 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
69 .rodata1 : { *(.rodata1) }
70 .note.gnu.build-id : {
71 PROVIDE (__build_id_start = .);
73 PROVIDE (__build_id_end = .);
75 .eh_frame_hdr : { *(.eh_frame_hdr) }
76 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
77 .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
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 (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
81 PROVIDE (brwsection = .);
82 /* Exception handling */
83 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
84 .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
85 /* Thread Local Storage sections */
86 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
87 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
90 PROVIDE_HIDDEN (__preinit_array_start = .);
91 KEEP (*(.preinit_array))
92 PROVIDE_HIDDEN (__preinit_array_end = .);
96 PROVIDE_HIDDEN (__init_array_start = .);
97 KEEP (*(SORT(.init_array.*)))
99 PROVIDE_HIDDEN (__init_array_end = .);
103 PROVIDE_HIDDEN (__fini_array_start = .);
104 KEEP (*(.fini_array))
105 KEEP (*(SORT(.fini_array.*)))
106 PROVIDE_HIDDEN (__fini_array_end = .);
109 PROVIDE (start_ctors = .);
112 /* gcc uses crtbegin.o to find the start of
113 the constructors, so we make sure it is
114 first. Because this is a wildcard, it
115 doesn't matter if the user does not
116 actually link against crtbegin.o; the
117 linker won't look for a file to match a
118 wildcard. The wildcard also means that it
119 doesn't matter which directory crtbegin.o
121 KEEP (*crtbegin.o(.ctors))
122 KEEP (*crtbegin?.o(.ctors))
123 /* We don't want to include the .ctor section from
124 the crtend.o file until after the sorted ctors.
125 The .ctor section from the crtend file contains the
126 end of ctors marker and it must be last */
127 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
128 KEEP (*(SORT(.ctors.*)))
132 PROVIDE (stop_ctors = .);
135 KEEP (*crtbegin.o(.dtors))
136 KEEP (*crtbegin?.o(.dtors))
137 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
138 KEEP (*(SORT(.dtors.*)))
141 .jcr : { KEEP (*(.jcr)) }
142 .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
143 .dynamic : { *(.dynamic) }
145 . = DATA_SEGMENT_RELRO_END (24, .);
146 .got.plt : { *(.got.plt) }
148 .data.read_frequently :
150 *(SORT_BY_ALIGNMENT(.data.read_frequently))
157 .data.exclusive_cache_line :
159 *(.data.exclusive_cache_line)
164 *(.data .data.* .gnu.linkonce.d.*)
165 KEEP (*(.gnu.linkonce.d.*personality*))
167 .data1 : { *(.data1) }
168 _edata = .; PROVIDE (edata = .);
173 *(.bss .bss.* .gnu.linkonce.b.*)
175 /* Ensure that the .bss section ends at a superpage boundary.
176 This way it can be mapped using non-executable large pages. */
179 _end = .; PROVIDE (end = .);
180 . = DATA_SEGMENT_END (.);
181 /* Stabs debugging sections. */
182 .stab 0 : { *(.stab) }
183 .stabstr 0 : { *(.stabstr) }
184 .stab.excl 0 : { *(.stab.excl) }
185 .stab.exclstr 0 : { *(.stab.exclstr) }
186 .stab.index 0 : { *(.stab.index) }
187 .stab.indexstr 0 : { *(.stab.indexstr) }
188 .comment 0 : { *(.comment) }
189 /* DWARF debug sections.
190 Symbols in the DWARF debugging sections are relative to the beginning
191 of the section so we begin them at 0. */
193 .debug 0 : { *(.debug) }
194 .line 0 : { *(.line) }
195 /* GNU DWARF 1 extensions */
196 .debug_srcinfo 0 : { *(.debug_srcinfo) }
197 .debug_sfnames 0 : { *(.debug_sfnames) }
198 /* DWARF 1.1 and DWARF 2 */
199 .debug_aranges 0 : { *(.debug_aranges) }
200 .debug_pubnames 0 : { *(.debug_pubnames) }
202 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
203 .debug_abbrev 0 : { *(.debug_abbrev) }
204 .debug_line 0 : { *(.debug_line) }
205 .debug_frame 0 : { *(.debug_frame) }
206 .debug_str 0 : { *(.debug_str) }
207 .debug_loc 0 : { *(.debug_loc) }
208 .debug_macinfo 0 : { *(.debug_macinfo) }
209 /* SGI/MIPS DWARF 2 extensions */
210 .debug_weaknames 0 : { *(.debug_weaknames) }
211 .debug_funcnames 0 : { *(.debug_funcnames) }
212 .debug_typenames 0 : { *(.debug_typenames) }
213 .debug_varnames 0 : { *(.debug_varnames) }
215 .debug_pubtypes 0 : { *(.debug_pubtypes) }
216 .debug_ranges 0 : { *(.debug_ranges) }
217 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
218 /DISCARD/ : { *(.note.GNU-stack) }