1 /* ld script to make x86-64 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
4 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
5 OUTPUT_ARCH(i386:x86-64)
9 . = 0xffffffff80100000;
10 _text = .; /* Text and read-only data */
16 .text.lock : { *(.text.lock) } /* out-of-line lock text */
18 _etext = .; /* End of text section */
20 .rodata : { *(.rodata) *(.rodata.*) }
21 .kstrtab : { *(.kstrtab) }
23 . = ALIGN(16); /* Exception table */
24 __start___ex_table = .;
25 __ex_table : { *(__ex_table) }
26 __stop___ex_table = .;
28 __start___ksymtab = .; /* Kernel symbol table */
29 __ksymtab : { *(__ksymtab) }
32 __start___kallsyms = .; /* All kernel symbols */
33 __kallsyms : { *(__kallsyms) }
34 __stop___kallsyms = .;
41 _edata = .; /* End of data section */
43 __bss_start = .; /* BSS */
50 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
52 .vsyscall_0 -10*1024*1024: AT ((LOADADDR(.data.cacheline_aligned) + SIZEOF(.data.cacheline_aligned) + 4095) & ~(4095)) { *(.vsyscall_0) }
53 __vsyscall_0 = LOADADDR(.vsyscall_0);
55 .vxtime_sequence : AT ((LOADADDR(.vsyscall_0) + SIZEOF(.vsyscall_0) + 63) & ~(63)) { *(.vxtime_sequence) }
56 vxtime_sequence = LOADADDR(.vxtime_sequence);
58 .vxtime : AT ((LOADADDR(.vxtime_sequence) + SIZEOF(.vxtime_sequence) + 15) & ~(15)) { *(.vxtime) }
59 vxtime = LOADADDR(.vxtime);
61 .wall_jiffies : AT ((LOADADDR(.vxtime) + SIZEOF(.vxtime) + 15) & ~(15)) { *(.wall_jiffies) }
62 wall_jiffies = LOADADDR(.wall_jiffies);
64 .sys_tz : AT ((LOADADDR(.wall_jiffies) + SIZEOF(.wall_jiffies) + 15) & ~(15)) { *(.sys_tz) }
65 sys_tz = LOADADDR(.sys_tz);
67 .jiffies : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) { *(.jiffies) }
68 jiffies = LOADADDR(.jiffies);
70 .xtime : AT ((LOADADDR(.jiffies) + SIZEOF(.jiffies) + 15) & ~(15)) { *(.xtime) }
71 xtime = LOADADDR(.xtime);
72 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT (LOADADDR(.vsyscall_0) + 1024) { *(.vsyscall_1) }
73 . = LOADADDR(.vsyscall_0) + 4096;
75 . = ALIGN(8192); /* init_task */
76 .data.init_task : { *(.data.init_task) }
79 .data.boot_pgt : { *(.data.boot_pgt) }
81 . = ALIGN(4096); /* Init code and data */
83 .text.init : { *(.text.init) }
84 .data.init : { *(.data.init) }
87 .setup.init : { *(.setup.init) }
90 .initcall.init : { *(.initcall.init) }
97 /* Sections to be discarded */
105 .debug_info 0 : { *(.debug_info) }
106 .debug_abbrev 0 : { *(.debug_abbrev) }
107 .debug_line 0 : { *(.debug_line) }
108 .debug_frame 0 : { *(.debug_frame) }
109 .debug_str 0 : { *(.debug_str) }
110 .debug_loc 0 : { *(.debug_loc) }
111 .debug_macinfo 0 : { *(.debug_macinfo) }
112 /* SGI/MIPS DWARF 2 extensions */
113 .debug_weaknames 0 : { *(.debug_weaknames) }
114 .debug_funcnames 0 : { *(.debug_funcnames) }
115 .debug_typenames 0 : { *(.debug_typenames) }
116 .debug_varnames 0 : { *(.debug_varnames) }
119 .comment 0 : { *(.comment) }