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 */
22 .text.lock : { *(.text.lock) } /* out-of-line lock text */
24 _etext = .; /* End of text section */
26 . = ALIGN(16); /* Exception table */
27 __start___ex_table = .;
28 __ex_table : { *(__ex_table) }
29 __stop___ex_table = .;
38 _edata = .; /* End of data section */
40 __bss_start = .; /* BSS */
48 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
50 .vsyscall_0 -10*1024*1024: AT ((LOADADDR(.data.cacheline_aligned) + SIZEOF(.data.cacheline_aligned) + 4095) & ~(4095)) { *(.vsyscall_0) }
51 __vsyscall_0 = LOADADDR(.vsyscall_0);
53 .xtime_lock : AT ((LOADADDR(.vsyscall_0) + SIZEOF(.vsyscall_0) + 63) & ~(63)) { *(.xtime_lock) }
54 xtime_lock = LOADADDR(.xtime_lock);
56 .vxtime : AT ((LOADADDR(.xtime_lock) + SIZEOF(.xtime_lock) + 15) & ~(15)) { *(.vxtime) }
57 vxtime = LOADADDR(.vxtime);
59 .wall_jiffies : AT ((LOADADDR(.vxtime) + SIZEOF(.vxtime) + 15) & ~(15)) { *(.wall_jiffies) }
60 wall_jiffies = LOADADDR(.wall_jiffies);
62 .sys_tz : AT ((LOADADDR(.wall_jiffies) + SIZEOF(.wall_jiffies) + 15) & ~(15)) { *(.sys_tz) }
63 sys_tz = LOADADDR(.sys_tz);
65 .sysctl_vsyscall : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) { *(.sysctl_vsyscall) }
66 sysctl_vsyscall = LOADADDR(.sysctl_vsyscall);
68 .jiffies : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 15) & ~(15)) { *(.jiffies) }
69 jiffies = LOADADDR(.jiffies);
71 .xtime : AT ((LOADADDR(.jiffies) + SIZEOF(.jiffies) + 15) & ~(15)) { *(.xtime) }
72 xtime = LOADADDR(.xtime);
73 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT (LOADADDR(.vsyscall_0) + 1024) { *(.vsyscall_1) }
74 . = LOADADDR(.vsyscall_0) + 4096;
76 . = ALIGN(8192); /* init_task */
77 .data.init_task : { *(.data.init_task) }
80 .data.page_aligned : { *(.data.page_aligned) }
82 . = ALIGN(4096); /* Init code and data */
89 .init.data : { *(.init.data) }
92 .init.setup : { *(.init.setup) }
95 __param : { *(__param) }
108 __con_initcall_start = .;
109 .con_initcall.init : { *(.con_initcall.init) }
110 __con_initcall_end = .;
113 __alt_instructions = .;
114 .altinstructions : { *(.altinstructions) }
115 __alt_instructions_end = .;
116 .altinstr_replacement : { *(.altinstr_replacement) }
117 /* .exit.text is discard at runtime, not link time, to deal with references
118 from .altinstructions and .eh_frame */
119 .exit.text : { *(.exit.text) }
120 .exit.data : { *(.exit.data) }
122 __initramfs_start = .;
123 .init.ramfs : { *(.init.ramfs) }
127 .data.percpu : { *(.data.percpu) }
134 .data_nosave : { *(.data.nosave) }
140 /* Sections to be discarded */
143 #ifndef CONFIG_DEBUG_INFO
149 .debug_info 0 : { *(.debug_info) }
150 .debug_abbrev 0 : { *(.debug_abbrev) }
151 .debug_line 0 : { *(.debug_line) }
152 .debug_frame 0 : { *(.debug_frame) }
153 .debug_str 0 : { *(.debug_str) }
154 .debug_loc 0 : { *(.debug_loc) }
155 .debug_macinfo 0 : { *(.debug_macinfo) }
156 /* SGI/MIPS DWARF 2 extensions */
157 .debug_weaknames 0 : { *(.debug_weaknames) }
158 .debug_funcnames 0 : { *(.debug_funcnames) }
159 .debug_typenames 0 : { *(.debug_typenames) }
160 .debug_varnames 0 : { *(.debug_varnames) }
163 .comment 0 : { *(.comment) }