1 /* ld script to make x86-64 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
5 #include <asm-generic/vmlinux.lds.h>
6 #include <linux/config.h>
8 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
9 OUTPUT_ARCH(i386:x86-64)
14 . = 0xffffffff80100000;
15 _text = .; /* Text and read-only data */
23 .text.lock : { *(.text.lock) } /* out-of-line lock text */
25 _etext = .; /* End of text section */
27 . = ALIGN(16); /* Exception table */
28 __start___ex_table = .;
29 __ex_table : { *(__ex_table) }
30 __stop___ex_table = .;
39 _edata = .; /* End of data section */
41 __bss_start = .; /* BSS */
49 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
51 .vsyscall_0 -10*1024*1024: AT ((LOADADDR(.data.cacheline_aligned) + SIZEOF(.data.cacheline_aligned) + 4095) & ~(4095)) { *(.vsyscall_0) }
52 __vsyscall_0 = LOADADDR(.vsyscall_0);
54 .xtime_lock : AT ((LOADADDR(.vsyscall_0) + SIZEOF(.vsyscall_0) + 63) & ~(63)) { *(.xtime_lock) }
55 xtime_lock = LOADADDR(.xtime_lock);
57 .vxtime : AT ((LOADADDR(.xtime_lock) + SIZEOF(.xtime_lock) + 15) & ~(15)) { *(.vxtime) }
58 vxtime = LOADADDR(.vxtime);
60 .wall_jiffies : AT ((LOADADDR(.vxtime) + SIZEOF(.vxtime) + 15) & ~(15)) { *(.wall_jiffies) }
61 wall_jiffies = LOADADDR(.wall_jiffies);
63 .sys_tz : AT ((LOADADDR(.wall_jiffies) + SIZEOF(.wall_jiffies) + 15) & ~(15)) { *(.sys_tz) }
64 sys_tz = LOADADDR(.sys_tz);
66 .sysctl_vsyscall : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) { *(.sysctl_vsyscall) }
67 sysctl_vsyscall = LOADADDR(.sysctl_vsyscall);
69 .jiffies : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 15) & ~(15)) { *(.jiffies) }
70 jiffies = LOADADDR(.jiffies);
72 .xtime : AT ((LOADADDR(.jiffies) + SIZEOF(.jiffies) + 15) & ~(15)) { *(.xtime) }
73 xtime = LOADADDR(.xtime);
74 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT (LOADADDR(.vsyscall_0) + 1024) { *(.vsyscall_1) }
75 . = LOADADDR(.vsyscall_0) + 4096;
77 . = ALIGN(8192); /* init_task */
78 .data.init_task : { *(.data.init_task) }
81 .data.page_aligned : { *(.data.page_aligned) }
83 . = ALIGN(4096); /* Init code and data */
90 .init.data : { *(.init.data) }
93 .init.setup : { *(.init.setup) }
106 __con_initcall_start = .;
107 .con_initcall.init : { *(.con_initcall.init) }
108 __con_initcall_end = .;
111 __alt_instructions = .;
112 .altinstructions : { *(.altinstructions) }
113 __alt_instructions_end = .;
114 .altinstr_replacement : { *(.altinstr_replacement) }
115 /* .exit.text is discard at runtime, not link time, to deal with references
116 from .altinstructions and .eh_frame */
117 .exit.text : { *(.exit.text) }
118 .exit.data : { *(.exit.data) }
120 __initramfs_start = .;
121 .init.ramfs : { *(.init.ramfs) }
125 .data.percpu : { *(.data.percpu) }
132 .data_nosave : { *(.data.nosave) }
138 /* Sections to be discarded */
141 #ifndef CONFIG_DEBUG_INFO
147 .debug_info 0 : { *(.debug_info) }
148 .debug_abbrev 0 : { *(.debug_abbrev) }
149 .debug_line 0 : { *(.debug_line) }
150 .debug_frame 0 : { *(.debug_frame) }
151 .debug_str 0 : { *(.debug_str) }
152 .debug_loc 0 : { *(.debug_loc) }
153 .debug_macinfo 0 : { *(.debug_macinfo) }
154 /* SGI/MIPS DWARF 2 extensions */
155 .debug_weaknames 0 : { *(.debug_weaknames) }
156 .debug_funcnames 0 : { *(.debug_funcnames) }
157 .debug_typenames 0 : { *(.debug_typenames) }
158 .debug_varnames 0 : { *(.debug_varnames) }
161 .comment 0 : { *(.comment) }