Linux-2.6.12-rc2
[pandora-kernel.git] / arch / i386 / kernel / vmlinux.lds.S
1 /* ld script to make i386 Linux kernel
2  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3  */
4
5 #include <asm-generic/vmlinux.lds.h>
6 #include <asm/thread_info.h>
7 #include <asm/page.h>
8
9 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
10 OUTPUT_ARCH(i386)
11 ENTRY(startup_32)
12 jiffies = jiffies_64;
13 SECTIONS
14 {
15   . = __PAGE_OFFSET + 0x100000;
16   /* read-only */
17   _text = .;                    /* Text and read-only data */
18   .text : {
19         *(.text)
20         SCHED_TEXT
21         LOCK_TEXT
22         *(.fixup)
23         *(.gnu.warning)
24         } = 0x9090
25
26   _etext = .;                   /* End of text section */
27
28   . = ALIGN(16);                /* Exception table */
29   __start___ex_table = .;
30   __ex_table : { *(__ex_table) }
31   __stop___ex_table = .;
32
33   RODATA
34
35   /* writeable */
36   .data : {                     /* Data */
37         *(.data)
38         CONSTRUCTORS
39         }
40
41   . = ALIGN(4096);
42   __nosave_begin = .;
43   .data_nosave : { *(.data.nosave) }
44   . = ALIGN(4096);
45   __nosave_end = .;
46
47   . = ALIGN(4096);
48   .data.page_aligned : { *(.data.idt) }
49
50   . = ALIGN(32);
51   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
52
53   _edata = .;                   /* End of data section */
54
55   . = ALIGN(THREAD_SIZE);       /* init_task */
56   .data.init_task : { *(.data.init_task) }
57
58   /* will be freed after init */
59   . = ALIGN(4096);              /* Init code and data */
60   __init_begin = .;
61   .init.text : { 
62         _sinittext = .;
63         *(.init.text)
64         _einittext = .;
65   }
66   .init.data : { *(.init.data) }
67   . = ALIGN(16);
68   __setup_start = .;
69   .init.setup : { *(.init.setup) }
70   __setup_end = .;
71   __initcall_start = .;
72   .initcall.init : {
73         *(.initcall1.init) 
74         *(.initcall2.init) 
75         *(.initcall3.init) 
76         *(.initcall4.init) 
77         *(.initcall5.init) 
78         *(.initcall6.init) 
79         *(.initcall7.init)
80   }
81   __initcall_end = .;
82   __con_initcall_start = .;
83   .con_initcall.init : { *(.con_initcall.init) }
84   __con_initcall_end = .;
85   SECURITY_INIT
86   . = ALIGN(4);
87   __alt_instructions = .;
88   .altinstructions : { *(.altinstructions) } 
89   __alt_instructions_end = .; 
90  .altinstr_replacement : { *(.altinstr_replacement) } 
91   /* .exit.text is discard at runtime, not link time, to deal with references
92      from .altinstructions and .eh_frame */
93   .exit.text : { *(.exit.text) }
94   .exit.data : { *(.exit.data) }
95   . = ALIGN(4096);
96   __initramfs_start = .;
97   .init.ramfs : { *(.init.ramfs) }
98   __initramfs_end = .;
99   . = ALIGN(32);
100   __per_cpu_start = .;
101   .data.percpu  : { *(.data.percpu) }
102   __per_cpu_end = .;
103   . = ALIGN(4096);
104   __init_end = .;
105   /* freed after init ends here */
106         
107   __bss_start = .;              /* BSS */
108   .bss : {
109         *(.bss.page_aligned)
110         *(.bss)
111   }
112   . = ALIGN(4);
113   __bss_stop = .; 
114
115   _end = . ;
116
117   /* This is where the kernel creates the early boot page tables */
118   . = ALIGN(4096);
119   pg0 = .;
120
121   /* Sections to be discarded */
122   /DISCARD/ : {
123         *(.exitcall.exit)
124         }
125
126   /* Stabs debugging sections.  */
127   .stab 0 : { *(.stab) }
128   .stabstr 0 : { *(.stabstr) }
129   .stab.excl 0 : { *(.stab.excl) }
130   .stab.exclstr 0 : { *(.stab.exclstr) }
131   .stab.index 0 : { *(.stab.index) }
132   .stab.indexstr 0 : { *(.stab.indexstr) }
133   .comment 0 : { *(.comment) }
134 }