This commit was manufactured by cvs2svn to create tag
[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 #include <linux/config.h>
9 #include <asm/page.h>
10 #include <asm/asm_offsets.h>
11
12 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
13 OUTPUT_ARCH(i386)
14 ENTRY(startup_32)
15 jiffies = jiffies_64;
16 SECTIONS
17 {
18   . = __PAGE_OFFSET + 0x100000;
19   /* read-only */
20   _text = .;                    /* Text and read-only data */
21   .text : {
22         *(.text)
23         SCHED_TEXT
24         *(.fixup)
25         *(.gnu.warning)
26         } = 0x9090
27
28 #ifdef CONFIG_X86_4G
29   . = ALIGN(PAGE_SIZE_asm);
30   __entry_tramp_start = .;
31   . = FIX_ENTRY_TRAMPOLINE_0_addr;
32   __start___entry_text = .;
33   .entry.text : AT (__entry_tramp_start) { *(.entry.text) }
34   __entry_tramp_end = __entry_tramp_start + SIZEOF(.entry.text);
35   . = __entry_tramp_end;
36   . = ALIGN(PAGE_SIZE_asm);
37 #else
38   .entry.text : { *(.entry.text) }
39 #endif
40
41   _etext = .;                   /* End of text section */
42
43   . = ALIGN(16);                /* Exception table */
44   __start___ex_table = .;
45   __ex_table : { *(__ex_table) }
46   __stop___ex_table = .;
47
48   RODATA
49
50   /* writeable */
51   .data : {                     /* Data */
52         *(.data)
53         CONSTRUCTORS
54         }
55
56   . = ALIGN(PAGE_SIZE_asm);
57   __nosave_begin = .;
58   .data_nosave : { *(.data.nosave) }
59   . = ALIGN(PAGE_SIZE_asm);
60   __nosave_end = .;
61
62   . = ALIGN(32);
63   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
64
65   _edata = .;                   /* End of data section */
66
67   . = ALIGN(THREAD_SIZE);       /* init_task */
68   .data.init_task : { *(.data.init_task) }
69
70   /* will be freed after init */
71   . = ALIGN(PAGE_SIZE_asm);             /* Init code and data */
72   __init_begin = .;
73   .init.text : { 
74         _sinittext = .;
75         *(.init.text)
76         _einittext = .;
77   }
78   .init.data : { *(.init.data) }
79   . = ALIGN(16);
80   __setup_start = .;
81   .init.setup : { *(.init.setup) }
82   __setup_end = .;
83   __start___param = .;
84   __param : { *(__param) }
85   __stop___param = .;
86   __initcall_start = .;
87   .initcall.init : {
88         *(.initcall1.init) 
89         *(.initcall2.init) 
90         *(.initcall3.init) 
91         *(.initcall4.init) 
92         *(.initcall5.init) 
93         *(.initcall6.init) 
94         *(.initcall7.init)
95   }
96   __initcall_end = .;
97   __con_initcall_start = .;
98   .con_initcall.init : { *(.con_initcall.init) }
99   __con_initcall_end = .;
100   SECURITY_INIT
101   . = ALIGN(4);
102   __alt_instructions = .;
103   .altinstructions : { *(.altinstructions) } 
104   __alt_instructions_end = .; 
105  .altinstr_replacement : { *(.altinstr_replacement) } 
106   /* .exit.text is discard at runtime, not link time, to deal with references
107      from .altinstructions and .eh_frame */
108   .exit.text : { *(.exit.text) }
109   .exit.data : { *(.exit.data) }
110   . = ALIGN(PAGE_SIZE_asm);
111   __initramfs_start = .;
112   .init.ramfs : { *(.init.ramfs) }
113   __initramfs_end = .;
114   . = ALIGN(32);
115   __per_cpu_start = .;
116   .data.percpu  : { *(.data.percpu) }
117   __per_cpu_end = .;
118   . = ALIGN(PAGE_SIZE_asm);
119   __init_end = .;
120   /* freed after init ends here */
121
122   . = ALIGN(PAGE_SIZE_asm);
123   .data.page_aligned_tss : { *(.data.tss) }
124
125   . = ALIGN(PAGE_SIZE_asm);
126   .data.page_aligned_default_ldt : { *(.data.default_ldt) }
127
128   . = ALIGN(PAGE_SIZE_asm);
129   .data.page_aligned_idt : { *(.data.idt) }
130
131   . = ALIGN(PAGE_SIZE_asm);
132   .data.page_aligned_gdt : { *(.data.gdt) }
133
134   __bss_start = .;              /* BSS */
135   .bss : {
136         *(.bss.page_aligned)
137         *(.bss)
138   }
139   . = ALIGN(4);
140   __bss_stop = .; 
141
142   _end = . ;
143
144   /* This is where the kernel creates the early boot page tables */
145   . = ALIGN(4096);
146   pg0 = .;
147
148   /* Sections to be discarded */
149   /DISCARD/ : {
150         *(.exitcall.exit)
151         }
152
153   /* Stabs debugging sections.  */
154   .stab 0 : { *(.stab) }
155   .stabstr 0 : { *(.stabstr) }
156   .stab.excl 0 : { *(.stab.excl) }
157   .stab.exclstr 0 : { *(.stab.exclstr) }
158   .stab.index 0 : { *(.stab.index) }
159   .stab.indexstr 0 : { *(.stab.indexstr) }
160   .comment 0 : { *(.comment) }
161
162
163 }