ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.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
8 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
9 OUTPUT_ARCH(i386)
10 ENTRY(startup_32)
11 jiffies = jiffies_64;
12 SECTIONS
13 {
14   . = 0xC0000000 + 0x100000;
15   /* read-only */
16   _text = .;                    /* Text and read-only data */
17   .text : {
18         *(.text)
19         SCHED_TEXT
20         *(.fixup)
21         *(.gnu.warning)
22         } = 0x9090
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   /* writeable */
34   .data : {                     /* Data */
35         *(.data)
36         CONSTRUCTORS
37         }
38
39   . = ALIGN(4096);
40   __nosave_begin = .;
41   .data_nosave : { *(.data.nosave) }
42   . = ALIGN(4096);
43   __nosave_end = .;
44
45   . = ALIGN(4096);
46   .data.page_aligned : { *(.data.idt) }
47
48   . = ALIGN(32);
49   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
50
51   _edata = .;                   /* End of data section */
52
53   . = ALIGN(THREAD_SIZE);       /* init_task */
54   .data.init_task : { *(.data.init_task) }
55
56   /* will be freed after init */
57   . = ALIGN(4096);              /* Init code and data */
58   __init_begin = .;
59   .init.text : { 
60         _sinittext = .;
61         *(.init.text)
62         _einittext = .;
63   }
64   .init.data : { *(.init.data) }
65   . = ALIGN(16);
66   __setup_start = .;
67   .init.setup : { *(.init.setup) }
68   __setup_end = .;
69   __start___param = .;
70   __param : { *(__param) }
71   __stop___param = .;
72   __initcall_start = .;
73   .initcall.init : {
74         *(.initcall1.init) 
75         *(.initcall2.init) 
76         *(.initcall3.init) 
77         *(.initcall4.init) 
78         *(.initcall5.init) 
79         *(.initcall6.init) 
80         *(.initcall7.init)
81   }
82   __initcall_end = .;
83   __con_initcall_start = .;
84   .con_initcall.init : { *(.con_initcall.init) }
85   __con_initcall_end = .;
86   SECURITY_INIT
87   . = ALIGN(4);
88   __alt_instructions = .;
89   .altinstructions : { *(.altinstructions) } 
90   __alt_instructions_end = .; 
91  .altinstr_replacement : { *(.altinstr_replacement) } 
92   /* .exit.text is discard at runtime, not link time, to deal with references
93      from .altinstructions and .eh_frame */
94   .exit.text : { *(.exit.text) }
95   .exit.data : { *(.exit.data) }
96   . = ALIGN(4096);
97   __initramfs_start = .;
98   .init.ramfs : { *(.init.ramfs) }
99   __initramfs_end = .;
100   . = ALIGN(32);
101   __per_cpu_start = .;
102   .data.percpu  : { *(.data.percpu) }
103   __per_cpu_end = .;
104   . = ALIGN(4096);
105   __init_end = .;
106   /* freed after init ends here */
107         
108   __bss_start = .;              /* BSS */
109   .bss : {
110         *(.bss.page_aligned)
111         *(.bss)
112   }
113   . = ALIGN(4);
114   __bss_stop = .; 
115
116   _end = . ;
117
118   /* This is where the kernel creates the early boot page tables */
119   . = ALIGN(4096);
120   pg0 = .;
121
122   /* Sections to be discarded */
123   /DISCARD/ : {
124         *(.exitcall.exit)
125         }
126
127   /* Stabs debugging sections.  */
128   .stab 0 : { *(.stab) }
129   .stabstr 0 : { *(.stabstr) }
130   .stab.excl 0 : { *(.stab.excl) }
131   .stab.exclstr 0 : { *(.stab.exclstr) }
132   .stab.index 0 : { *(.stab.index) }
133   .stab.indexstr 0 : { *(.stab.indexstr) }
134   .comment 0 : { *(.comment) }
135 }