Deleted Added
full compact
ldscript.amd64 (108777) ldscript.amd64 (114370)
1/* $FreeBSD: head/sys/conf/ldscript.amd64 108777 2003-01-06 07:37:15Z phk $ */
2OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd")
3OUTPUT_ARCH(i386)
1/* $FreeBSD: head/sys/conf/ldscript.amd64 114370 2003-05-01 02:59:24Z peter $ */
2OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
3OUTPUT_ARCH(i386:x86-64)
4ENTRY(btext)
4ENTRY(btext)
5SEARCH_DIR(/usr/lib);
5SEARCH_DIR("/usr/lib");
6SECTIONS
7{
8 /* Read-only sections, merged into text segment: */
9 . = kernbase + 0x00100000 + SIZEOF_HEADERS;
6SECTIONS
7{
8 /* Read-only sections, merged into text segment: */
9 . = kernbase + 0x00100000 + SIZEOF_HEADERS;
10 .interp : { *(.interp) }
11 .hash : { *(.hash) }
12 .dynsym : { *(.dynsym) }
13 .dynstr : { *(.dynstr) }
14 .gnu.version : { *(.gnu.version) }
15 .gnu.version_d : { *(.gnu.version_d) }
16 .gnu.version_r : { *(.gnu.version_r) }
17 .rel.text :
18 { *(.rel.text) *(.rel.gnu.linkonce.t*) }
19 .rela.text :
20 { *(.rela.text) *(.rela.gnu.linkonce.t*) }
21 .rel.data :
22 { *(.rel.data) *(.rel.gnu.linkonce.d*) }
23 .rela.data :
24 { *(.rela.data) *(.rela.gnu.linkonce.d*) }
25 .rel.rodata :
26 { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
27 .rela.rodata :
28 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
29 .rel.got : { *(.rel.got) }
30 .rela.got : { *(.rela.got) }
31 .rel.ctors : { *(.rel.ctors) }
32 .rela.ctors : { *(.rela.ctors) }
33 .rel.dtors : { *(.rel.dtors) }
34 .rela.dtors : { *(.rela.dtors) }
35 .rel.init : { *(.rel.init) }
36 .rela.init : { *(.rela.init) }
37 .rel.fini : { *(.rel.fini) }
38 .rela.fini : { *(.rela.fini) }
39 .rel.bss : { *(.rel.bss) }
40 .rela.bss : { *(.rela.bss) }
41 .rel.plt : { *(.rel.plt) }
42 .rela.plt : { *(.rela.plt) }
43 .init : { *(.init) } =0x9090
44 .plt : { *(.plt) }
45 .text :
10 .interp : { *(.interp) }
11 .hash : { *(.hash) }
12 .dynsym : { *(.dynsym) }
13 .dynstr : { *(.dynstr) }
14 .gnu.version : { *(.gnu.version) }
15 .gnu.version_d : { *(.gnu.version_d) }
16 .gnu.version_r : { *(.gnu.version_r) }
17 .rel.init : { *(.rel.init) }
18 .rela.init : { *(.rela.init) }
19 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
20 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
21 .rel.fini : { *(.rel.fini) }
22 .rela.fini : { *(.rela.fini) }
23 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
24 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
25 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
26 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
27 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
28 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
29 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
30 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
31 .rel.ctors : { *(.rel.ctors) }
32 .rela.ctors : { *(.rela.ctors) }
33 .rel.dtors : { *(.rel.dtors) }
34 .rela.dtors : { *(.rela.dtors) }
35 .rel.got : { *(.rel.got) }
36 .rela.got : { *(.rela.got) }
37 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
38 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
39 .rel.plt : { *(.rel.plt) }
40 .rela.plt : { *(.rela.plt) }
41 .init :
46 {
42 {
47 *(.text)
48 *(.stub)
43 KEEP (*(.init))
44 } =0x90909090
45 .plt : { *(.plt) }
46 .text :
47 {
48 *(.text .stub .text.* .gnu.linkonce.t.*)
49 /* .gnu.warning sections are handled specially by elf32.em. */
50 *(.gnu.warning)
49 /* .gnu.warning sections are handled specially by elf32.em. */
50 *(.gnu.warning)
51 *(.gnu.linkonce.t*)
52 } =0x9090
53 _etext = .;
51 } =0x90909090
52 .fini :
53 {
54 KEEP (*(.fini))
55 } =0x90909090
56 PROVIDE (__etext = .);
57 PROVIDE (_etext = .);
54 PROVIDE (etext = .);
58 PROVIDE (etext = .);
55 .fini : { *(.fini) } =0x9090
56 .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
57 .rodata1 : { *(.rodata1) }
59 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
60 .rodata1 : { *(.rodata1) }
61 .eh_frame_hdr : { *(.eh_frame_hdr) }
58 /* Adjust the address for the data segment. We want to adjust up to
59 the same address within the page on the next page up. */
62 /* Adjust the address for the data segment. We want to adjust up to
63 the same address within the page on the next page up. */
60 . = ALIGN(0x1000) + (. & (0x1000 - 1)) ;
61 .data :
64 . = DATA_SEGMENT_ALIGN(0x100000, 0x1000);
65 /* Ensure the __preinit_array_start label is properly aligned. We
66 could instead move the label definition inside the section, but
67 the linker would then create the section even if it turns out to
68 be empty, which isn't pretty. */
69 . = ALIGN(64 / 8);
70 PROVIDE (__preinit_array_start = .);
71 .preinit_array : { *(.preinit_array) }
72 PROVIDE (__preinit_array_end = .);
73 PROVIDE (__init_array_start = .);
74 .init_array : { *(.init_array) }
75 PROVIDE (__init_array_end = .);
76 PROVIDE (__fini_array_start = .);
77 .fini_array : { *(.fini_array) }
78 PROVIDE (__fini_array_end = .);
79 .data :
62 {
80 {
63 *(.data)
64 *(.gnu.linkonce.d*)
65 CONSTRUCTORS
81 *(.data .data.* .gnu.linkonce.d.*)
82 SORT(CONSTRUCTORS)
66 }
83 }
67 .data1 : { *(.data1) }
68 _start_ctors = .;
69 PROVIDE (start_ctors = .);
70 .ctors :
84 .data1 : { *(.data1) }
85 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
86 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
87 .eh_frame : { KEEP (*(.eh_frame)) }
88 .gcc_except_table : { *(.gcc_except_table) }
89 .dynamic : { *(.dynamic) }
90 .ctors :
71 {
91 {
72 *(.ctors)
92 /* gcc uses crtbegin.o to find the start of
93 the constructors, so we make sure it is
94 first. Because this is a wildcard, it
95 doesn't matter if the user does not
96 actually link against crtbegin.o; the
97 linker won't look for a file to match a
98 wildcard. The wildcard also means that it
99 doesn't matter which directory crtbegin.o
100 is in. */
101 KEEP (*crtbegin.o(.ctors))
102 /* We don't want to include the .ctor section from
103 from the crtend.o file until after the sorted ctors.
104 The .ctor section from the crtend file contains the
105 end of ctors marker and it must be last */
106 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
107 KEEP (*(SORT(.ctors.*)))
108 KEEP (*(.ctors))
73 }
109 }
74 _stop_ctors = .;
75 PROVIDE (stop_ctors = .);
76 .dtors :
110 .dtors :
77 {
111 {
78 *(.dtors)
112 KEEP (*crtbegin.o(.dtors))
113 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
114 KEEP (*(SORT(.dtors.*)))
115 KEEP (*(.dtors))
79 }
116 }
80 .got : { *(.got.plt) *(.got) }
81 .dynamic : { *(.dynamic) }
82 /* We want the small data sections together, so single-instruction offsets
83 can access them all, and initialized data all before uninitialized, so
84 we can shorten the on-disk segment size. */
85 .sdata : { *(.sdata) }
86 _edata = .;
117 .jcr : { KEEP (*(.jcr)) }
118 .got : { *(.got.plt) *(.got) }
119 _edata = .;
87 PROVIDE (edata = .);
88 __bss_start = .;
120 PROVIDE (edata = .);
121 __bss_start = .;
89 .sbss : { *(.sbss) *(.scommon) }
90 .bss :
122 .bss :
91 {
92 *(.dynbss)
123 {
124 *(.dynbss)
93 *(.bss)
125 *(.bss .bss.* .gnu.linkonce.b.*)
94 *(COMMON)
126 *(COMMON)
127 /* Align here to ensure that the .bss section occupies space up to
128 _end. Align after .bss to ensure correct alignment even if the
129 .bss section disappears because there are no input sections. */
130 . = ALIGN(64 / 8);
95 }
131 }
96 . = ALIGN(32 / 8);
97 _end = . ;
132 . = ALIGN(64 / 8);
133 _end = .;
98 PROVIDE (end = .);
134 PROVIDE (end = .);
135 . = DATA_SEGMENT_END (.);
99 /* Stabs debugging sections. */
136 /* Stabs debugging sections. */
100 .stab 0 : { *(.stab) }
101 .stabstr 0 : { *(.stabstr) }
102 .stab.excl 0 : { *(.stab.excl) }
103 .stab.exclstr 0 : { *(.stab.exclstr) }
104 .stab.index 0 : { *(.stab.index) }
137 .stab 0 : { *(.stab) }
138 .stabstr 0 : { *(.stabstr) }
139 .stab.excl 0 : { *(.stab.excl) }
140 .stab.exclstr 0 : { *(.stab.exclstr) }
141 .stab.index 0 : { *(.stab.index) }
105 .stab.indexstr 0 : { *(.stab.indexstr) }
142 .stab.indexstr 0 : { *(.stab.indexstr) }
106 .comment 0 : { *(.comment) }
143 .comment 0 : { *(.comment) }
107 /* DWARF debug sections.
108 Symbols in the DWARF debugging sections are relative to the beginning
109 of the section so we begin them at 0. */
110 /* DWARF 1 */
111 .debug 0 : { *(.debug) }
112 .line 0 : { *(.line) }
113 /* GNU DWARF 1 extensions */
114 .debug_srcinfo 0 : { *(.debug_srcinfo) }
115 .debug_sfnames 0 : { *(.debug_sfnames) }
116 /* DWARF 1.1 and DWARF 2 */
117 .debug_aranges 0 : { *(.debug_aranges) }
118 .debug_pubnames 0 : { *(.debug_pubnames) }
119 /* DWARF 2 */
144 /* DWARF debug sections.
145 Symbols in the DWARF debugging sections are relative to the beginning
146 of the section so we begin them at 0. */
147 /* DWARF 1 */
148 .debug 0 : { *(.debug) }
149 .line 0 : { *(.line) }
150 /* GNU DWARF 1 extensions */
151 .debug_srcinfo 0 : { *(.debug_srcinfo) }
152 .debug_sfnames 0 : { *(.debug_sfnames) }
153 /* DWARF 1.1 and DWARF 2 */
154 .debug_aranges 0 : { *(.debug_aranges) }
155 .debug_pubnames 0 : { *(.debug_pubnames) }
156 /* DWARF 2 */
120 .debug_info 0 : { *(.debug_info) }
157 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
121 .debug_abbrev 0 : { *(.debug_abbrev) }
122 .debug_line 0 : { *(.debug_line) }
123 .debug_frame 0 : { *(.debug_frame) }
124 .debug_str 0 : { *(.debug_str) }
125 .debug_loc 0 : { *(.debug_loc) }
126 .debug_macinfo 0 : { *(.debug_macinfo) }
127 /* SGI/MIPS DWARF 2 extensions */
128 .debug_weaknames 0 : { *(.debug_weaknames) }
129 .debug_funcnames 0 : { *(.debug_funcnames) }
130 .debug_typenames 0 : { *(.debug_typenames) }
131 .debug_varnames 0 : { *(.debug_varnames) }
158 .debug_abbrev 0 : { *(.debug_abbrev) }
159 .debug_line 0 : { *(.debug_line) }
160 .debug_frame 0 : { *(.debug_frame) }
161 .debug_str 0 : { *(.debug_str) }
162 .debug_loc 0 : { *(.debug_loc) }
163 .debug_macinfo 0 : { *(.debug_macinfo) }
164 /* SGI/MIPS DWARF 2 extensions */
165 .debug_weaknames 0 : { *(.debug_weaknames) }
166 .debug_funcnames 0 : { *(.debug_funcnames) }
167 .debug_typenames 0 : { *(.debug_typenames) }
168 .debug_varnames 0 : { *(.debug_varnames) }
132 /* These must appear regardless of . */
133}
169}