ia64/xen-unstable

view linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S @ 13688:5bb084098493

[LINUX] Force .data segment to be 4k aligned on i386.

Changeset 4e878f596c16 applied this change to the patches directory
but we also need to patch the sparse tree.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Mon Jan 29 13:22:21 2007 +0000 (2007-01-29)
parents 3adf00179a63
children
line source
1 /* ld script to make i386 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3 */
5 #define LOAD_OFFSET __PAGE_OFFSET
7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/thread_info.h>
9 #include <asm/page.h>
10 #include <asm/cache.h>
12 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
13 OUTPUT_ARCH(i386)
14 ENTRY(phys_startup_32)
15 jiffies = jiffies_64;
17 PHDRS {
18 text PT_LOAD FLAGS(5); /* R_E */
19 data PT_LOAD FLAGS(7); /* RWE */
20 note PT_NOTE FLAGS(4); /* R__ */
21 }
22 SECTIONS
23 {
24 . = __KERNEL_START;
25 phys_startup_32 = startup_32 - LOAD_OFFSET;
26 /* read-only */
27 _text = .; /* Text and read-only data */
28 .text : AT(ADDR(.text) - LOAD_OFFSET) {
29 *(.text)
30 SCHED_TEXT
31 LOCK_TEXT
32 KPROBES_TEXT
33 *(.fixup)
34 *(.gnu.warning)
35 } :text = 0x9090
37 _etext = .; /* End of text section */
39 . = ALIGN(16); /* Exception table */
40 __start___ex_table = .;
41 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
42 __stop___ex_table = .;
44 RODATA
46 . = ALIGN(4);
47 __tracedata_start = .;
48 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
49 *(.tracedata)
50 }
51 __tracedata_end = .;
53 /* writeable */
54 . = ALIGN(4096);
55 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
56 *(.data)
57 CONSTRUCTORS
58 } :data
60 . = ALIGN(4096);
61 __nosave_begin = .;
62 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) }
63 . = ALIGN(4096);
64 __nosave_end = .;
66 . = ALIGN(4096);
67 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
68 *(.data.idt)
69 }
71 . = ALIGN(32);
72 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
73 *(.data.cacheline_aligned)
74 }
76 /* rarely changed data like cpu maps */
77 . = ALIGN(32);
78 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { *(.data.read_mostly) }
79 _edata = .; /* End of data section */
81 #ifdef CONFIG_STACK_UNWIND
82 . = ALIGN(4);
83 .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) {
84 __start_unwind = .;
85 *(.eh_frame)
86 __end_unwind = .;
87 }
88 #endif
90 . = ALIGN(THREAD_SIZE); /* init_task */
91 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
92 *(.data.init_task)
93 }
95 /* might get freed after init */
96 . = ALIGN(4096);
97 __smp_alt_begin = .;
98 __smp_alt_instructions = .;
99 .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) {
100 *(.smp_altinstructions)
101 }
102 __smp_alt_instructions_end = .;
103 . = ALIGN(4);
104 __smp_locks = .;
105 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
106 *(.smp_locks)
107 }
108 __smp_locks_end = .;
109 .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) {
110 *(.smp_altinstr_replacement)
111 }
112 . = ALIGN(4096);
113 __smp_alt_end = .;
115 /* will be freed after init */
116 . = ALIGN(4096); /* Init code and data */
117 __init_begin = .;
118 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
119 _sinittext = .;
120 *(.init.text)
121 _einittext = .;
122 }
123 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) }
124 . = ALIGN(16);
125 __setup_start = .;
126 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) }
127 __setup_end = .;
128 __initcall_start = .;
129 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
130 *(.initcall1.init)
131 *(.initcall2.init)
132 *(.initcall3.init)
133 *(.initcall4.init)
134 *(.initcall5.init)
135 *(.initcall6.init)
136 *(.initcall7.init)
137 }
138 __initcall_end = .;
139 __con_initcall_start = .;
140 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
141 *(.con_initcall.init)
142 }
143 __con_initcall_end = .;
144 SECURITY_INIT
145 . = ALIGN(4);
146 __alt_instructions = .;
147 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {
148 *(.altinstructions)
149 }
150 __alt_instructions_end = .;
151 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) {
152 *(.altinstr_replacement)
153 }
154 /* .exit.text is discard at runtime, not link time, to deal with references
155 from .altinstructions and .eh_frame */
156 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
157 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
158 . = ALIGN(4096);
159 __initramfs_start = .;
160 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
161 __initramfs_end = .;
162 . = ALIGN(L1_CACHE_BYTES);
163 __per_cpu_start = .;
164 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
165 __per_cpu_end = .;
166 . = ALIGN(4096);
167 __init_end = .;
168 /* freed after init ends here */
170 __bss_start = .; /* BSS */
171 .bss.page_aligned : AT(ADDR(.bss.page_aligned) - LOAD_OFFSET) {
172 *(.bss.page_aligned)
173 }
174 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
175 *(.bss)
176 }
177 . = ALIGN(4);
178 __bss_stop = .;
180 _end = . ;
182 /* This is where the kernel creates the early boot page tables */
183 . = ALIGN(4096);
184 pg0 = .;
186 /* Sections to be discarded */
187 /DISCARD/ : {
188 *(.exitcall.exit)
189 }
191 STABS_DEBUG
193 DWARF_DEBUG
195 NOTES
196 }