diff options
Diffstat (limited to 'arch/x86/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 89aed99aafce..98b378dc7f86 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -161,12 +161,6 @@ SECTIONS | |||
161 | 161 | ||
162 | #define VVIRT_OFFSET (VSYSCALL_ADDR - __vsyscall_0) | 162 | #define VVIRT_OFFSET (VSYSCALL_ADDR - __vsyscall_0) |
163 | #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) | 163 | #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) |
164 | #define EMIT_VVAR(x, offset) .vsyscall_var_ ## x \ | ||
165 | ADDR(.vsyscall_0) + offset \ | ||
166 | : AT(VLOAD(.vsyscall_var_ ## x)) { \ | ||
167 | *(.vsyscall_var_ ## x) \ | ||
168 | } \ | ||
169 | x = VVIRT(.vsyscall_var_ ## x); | ||
170 | 164 | ||
171 | . = ALIGN(4096); | 165 | . = ALIGN(4096); |
172 | __vsyscall_0 = .; | 166 | __vsyscall_0 = .; |
@@ -192,19 +186,31 @@ SECTIONS | |||
192 | *(.vsyscall_3) | 186 | *(.vsyscall_3) |
193 | } | 187 | } |
194 | 188 | ||
195 | #define __VVAR_KERNEL_LDS | 189 | . = ALIGN(__vsyscall_0 + PAGE_SIZE, PAGE_SIZE); |
196 | #include <asm/vvar.h> | ||
197 | #undef __VVAR_KERNEL_LDS | ||
198 | |||
199 | . = __vsyscall_0 + PAGE_SIZE; | ||
200 | 190 | ||
201 | #undef VSYSCALL_ADDR | 191 | #undef VSYSCALL_ADDR |
202 | #undef VLOAD_OFFSET | 192 | #undef VLOAD_OFFSET |
203 | #undef VLOAD | 193 | #undef VLOAD |
204 | #undef VVIRT_OFFSET | 194 | #undef VVIRT_OFFSET |
205 | #undef VVIRT | 195 | #undef VVIRT |
196 | |||
197 | __vvar_page = .; | ||
198 | |||
199 | .vvar : AT(ADDR(.vvar) - LOAD_OFFSET) { | ||
200 | |||
201 | /* Place all vvars at the offsets in asm/vvar.h. */ | ||
202 | #define EMIT_VVAR(name, offset) \ | ||
203 | . = offset; \ | ||
204 | *(.vvar_ ## name) | ||
205 | #define __VVAR_KERNEL_LDS | ||
206 | #include <asm/vvar.h> | ||
207 | #undef __VVAR_KERNEL_LDS | ||
206 | #undef EMIT_VVAR | 208 | #undef EMIT_VVAR |
207 | 209 | ||
210 | } :data | ||
211 | |||
212 | . = ALIGN(__vvar_page + PAGE_SIZE, PAGE_SIZE); | ||
213 | |||
208 | #endif /* CONFIG_X86_64 */ | 214 | #endif /* CONFIG_X86_64 */ |
209 | 215 | ||
210 | /* Init code and data - will be freed after init */ | 216 | /* Init code and data - will be freed after init */ |