diff options
author | Andy Lutomirski <luto@MIT.EDU> | 2011-08-03 09:31:50 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-08-04 19:13:35 -0400 |
commit | 9c40818da5b39fca236029059ab839857b1ef56c (patch) | |
tree | bfeb2ee130ff5b583aa26c541ea36f8bbad6cbf7 /arch | |
parent | 1bdfac19b3ecfca545281c15c7aea7ebc2eaef31 (diff) |
x86-64: Move the "user" vsyscall segment out of the data segment.
The kernel's loader doesn't seem to care, but gold complains.
Signed-off-by: Andy Lutomirski <luto@mit.edu>
Link: http://lkml.kernel.org/r/f0716870c297242a841b949953d80c0d87bf3d3f.1312378163.git.luto@mit.edu
Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 4aa9c54a9b76..e79fb3951fce 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -154,6 +154,24 @@ SECTIONS | |||
154 | 154 | ||
155 | #ifdef CONFIG_X86_64 | 155 | #ifdef CONFIG_X86_64 |
156 | 156 | ||
157 | . = ALIGN(PAGE_SIZE); | ||
158 | __vvar_page = .; | ||
159 | |||
160 | .vvar : AT(ADDR(.vvar) - LOAD_OFFSET) { | ||
161 | |||
162 | /* Place all vvars at the offsets in asm/vvar.h. */ | ||
163 | #define EMIT_VVAR(name, offset) \ | ||
164 | . = offset; \ | ||
165 | *(.vvar_ ## name) | ||
166 | #define __VVAR_KERNEL_LDS | ||
167 | #include <asm/vvar.h> | ||
168 | #undef __VVAR_KERNEL_LDS | ||
169 | #undef EMIT_VVAR | ||
170 | |||
171 | } :data | ||
172 | |||
173 | . = ALIGN(__vvar_page + PAGE_SIZE, PAGE_SIZE); | ||
174 | |||
157 | #define VSYSCALL_ADDR (-10*1024*1024) | 175 | #define VSYSCALL_ADDR (-10*1024*1024) |
158 | 176 | ||
159 | #define VLOAD_OFFSET (VSYSCALL_ADDR - __vsyscall_0 + LOAD_OFFSET) | 177 | #define VLOAD_OFFSET (VSYSCALL_ADDR - __vsyscall_0 + LOAD_OFFSET) |
@@ -162,7 +180,6 @@ SECTIONS | |||
162 | #define VVIRT_OFFSET (VSYSCALL_ADDR - __vsyscall_0) | 180 | #define VVIRT_OFFSET (VSYSCALL_ADDR - __vsyscall_0) |
163 | #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) | 181 | #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) |
164 | 182 | ||
165 | . = ALIGN(4096); | ||
166 | __vsyscall_0 = .; | 183 | __vsyscall_0 = .; |
167 | 184 | ||
168 | . = VSYSCALL_ADDR; | 185 | . = VSYSCALL_ADDR; |
@@ -185,23 +202,6 @@ SECTIONS | |||
185 | #undef VVIRT_OFFSET | 202 | #undef VVIRT_OFFSET |
186 | #undef VVIRT | 203 | #undef VVIRT |
187 | 204 | ||
188 | __vvar_page = .; | ||
189 | |||
190 | .vvar : AT(ADDR(.vvar) - LOAD_OFFSET) { | ||
191 | |||
192 | /* Place all vvars at the offsets in asm/vvar.h. */ | ||
193 | #define EMIT_VVAR(name, offset) \ | ||
194 | . = offset; \ | ||
195 | *(.vvar_ ## name) | ||
196 | #define __VVAR_KERNEL_LDS | ||
197 | #include <asm/vvar.h> | ||
198 | #undef __VVAR_KERNEL_LDS | ||
199 | #undef EMIT_VVAR | ||
200 | |||
201 | } :data | ||
202 | |||
203 | . = ALIGN(__vvar_page + PAGE_SIZE, PAGE_SIZE); | ||
204 | |||
205 | #endif /* CONFIG_X86_64 */ | 205 | #endif /* CONFIG_X86_64 */ |
206 | 206 | ||
207 | /* Init code and data - will be freed after init */ | 207 | /* Init code and data - will be freed after init */ |