ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / x86_64 / kernel / vmlinux.lds.S
1 /* ld script to make x86-64 Linux kernel
2  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3  */
4
5 #include <asm-generic/vmlinux.lds.h>
6 #include <linux/config.h>
7
8 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
9 OUTPUT_ARCH(i386:x86-64)
10 ENTRY(_start)
11 jiffies_64 = jiffies;
12 SECTIONS
13 {
14   . = 0xffffffff80100000;
15   _text = .;                    /* Text and read-only data */
16   .text : {
17         *(.text)
18         SCHED_TEXT
19         *(.fixup)
20         *(.gnu.warning)
21         } = 0x9090
22   .text.lock : { *(.text.lock) }        /* out-of-line lock text */
23
24   _etext = .;                   /* End of text section */
25
26   . = ALIGN(16);                /* Exception table */
27   __start___ex_table = .;
28   __ex_table : { *(__ex_table) }
29   __stop___ex_table = .;
30
31   RODATA
32
33   .data : {                     /* Data */
34         *(.data)
35         CONSTRUCTORS
36         }
37
38   _edata = .;                   /* End of data section */
39
40   __bss_start = .;              /* BSS */
41   .bss : {
42         *(.bss)
43         }
44   __bss_end = .;
45
46   . = ALIGN(64);
47   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
48
49   .vsyscall_0 -10*1024*1024: AT ((LOADADDR(.data.cacheline_aligned) + SIZEOF(.data.cacheline_aligned) + 4095) & ~(4095)) { *(.vsyscall_0) }
50   __vsyscall_0 = LOADADDR(.vsyscall_0);
51   . = ALIGN(64);
52   .xtime_lock : AT ((LOADADDR(.vsyscall_0) + SIZEOF(.vsyscall_0) + 63) & ~(63)) { *(.xtime_lock) }
53   xtime_lock = LOADADDR(.xtime_lock);
54   . = ALIGN(16);
55   .vxtime : AT ((LOADADDR(.xtime_lock) + SIZEOF(.xtime_lock) + 15) & ~(15)) { *(.vxtime) }
56   vxtime = LOADADDR(.vxtime);
57   . = ALIGN(16);
58   .wall_jiffies : AT ((LOADADDR(.vxtime) + SIZEOF(.vxtime) + 15) & ~(15)) { *(.wall_jiffies) }
59   wall_jiffies = LOADADDR(.wall_jiffies);
60   . = ALIGN(16);
61   .sys_tz : AT ((LOADADDR(.wall_jiffies) + SIZEOF(.wall_jiffies) + 15) & ~(15)) { *(.sys_tz) }
62   sys_tz = LOADADDR(.sys_tz);
63   . = ALIGN(16);
64   .sysctl_vsyscall : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) { *(.sysctl_vsyscall) }
65   sysctl_vsyscall = LOADADDR(.sysctl_vsyscall);
66   . = ALIGN(16);
67   .jiffies : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 15) & ~(15)) { *(.jiffies) }
68   jiffies = LOADADDR(.jiffies);
69   . = ALIGN(16);
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;
74
75   . = ALIGN(8192);              /* init_task */
76   .data.init_task : { *(.data.init_task) }
77
78   . = ALIGN(4096); 
79   .data.boot_pgt : { *(.data.boot_pgt) }
80
81   . = ALIGN(4096);              /* Init code and data */
82   __init_begin = .;
83   .init.text : { 
84         _sinittext = .;
85         *(.init.text)
86         _einittext = .;
87   }
88   .init.data : { *(.init.data) }
89   . = ALIGN(16);
90   __setup_start = .;
91   .init.setup : { *(.init.setup) }
92   __setup_end = .;
93   __start___param = .;
94   __param : { *(__param) }
95   __stop___param = .;
96   __initcall_start = .;
97   .initcall.init : {
98         *(.initcall1.init) 
99         *(.initcall2.init) 
100         *(.initcall3.init) 
101         *(.initcall4.init) 
102         *(.initcall5.init) 
103         *(.initcall6.init) 
104         *(.initcall7.init)
105   }
106   __initcall_end = .;
107   __con_initcall_start = .;
108   .con_initcall.init : { *(.con_initcall.init) }
109   __con_initcall_end = .;
110   SECURITY_INIT
111   . = ALIGN(8);
112   __alt_instructions = .;
113   .altinstructions : { *(.altinstructions) } 
114   __alt_instructions_end = .; 
115  .altinstr_replacement : { *(.altinstr_replacement) }
116   /* .exit.text is discard at runtime, not link time, to deal with references
117      from .altinstructions and .eh_frame */
118   .exit.text : { *(.exit.text) }
119   .exit.data : { *(.exit.data) }        
120   . = ALIGN(4096);
121   __initramfs_start = .;
122   .init.ramfs : { *(.init.ramfs) }
123   __initramfs_end = .;  
124   . = ALIGN(32);
125   __per_cpu_start = .;
126   .data.percpu  : { *(.data.percpu) }
127   __per_cpu_end = .;
128   . = ALIGN(4096);
129   __init_end = .;
130
131   . = ALIGN(4096);
132   __nosave_begin = .;
133   .data_nosave : { *(.data.nosave) }
134   . = ALIGN(4096);
135   __nosave_end = .;
136
137   _end = . ;
138
139   /* Sections to be discarded */
140   /DISCARD/ : {
141         *(.exitcall.exit)
142 #ifndef CONFIG_DEBUG_INFO
143         *(.eh_frame)
144 #endif
145         }
146
147   /* DWARF 2 */
148   .debug_info     0 : { *(.debug_info) }
149   .debug_abbrev   0 : { *(.debug_abbrev) }
150   .debug_line     0 : { *(.debug_line) }
151   .debug_frame    0 : { *(.debug_frame) }
152   .debug_str      0 : { *(.debug_str) }
153   .debug_loc      0 : { *(.debug_loc) }
154   .debug_macinfo  0 : { *(.debug_macinfo) }
155   /* SGI/MIPS DWARF 2 extensions */
156   .debug_weaknames 0 : { *(.debug_weaknames) }
157   .debug_funcnames 0 : { *(.debug_funcnames) }
158   .debug_typenames 0 : { *(.debug_typenames) }
159   .debug_varnames  0 : { *(.debug_varnames) }
160
161
162   .comment 0 : { *(.comment) }
163 }