diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-04-29 03:47:24 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 04:20:32 -0400 |
commit | ff6f87e1626e10beef675084c9b5384a9477e3d5 (patch) | |
tree | 06b2f8c2a3796b40c728699562f1c6ce650dedca /arch/x86/kernel/vmlinux.lds.S | |
parent | 1f6397bac55040cd520d9eaf299e155a7aa01d5f (diff) |
x86, vmlinux.lds: move vsyscall output sections
[ Impact: cleanup ]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1240991249-27117-8-git-send-email-sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 067bdb012dad..b3106c2a0373 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -159,6 +159,77 @@ SECTIONS | |||
159 | #endif | 159 | #endif |
160 | } | 160 | } |
161 | 161 | ||
162 | #ifdef CONFIG_X86_64 | ||
163 | |||
164 | #define VSYSCALL_ADDR (-10*1024*1024) | ||
165 | #define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + \ | ||
166 | SIZEOF(.data.read_mostly) + 4095) & ~(4095)) | ||
167 | #define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + \ | ||
168 | SIZEOF(.data.read_mostly) + 4095) & ~(4095)) | ||
169 | |||
170 | #define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR) | ||
171 | #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET) | ||
172 | |||
173 | #define VVIRT_OFFSET (VSYSCALL_ADDR - VSYSCALL_VIRT_ADDR) | ||
174 | #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) | ||
175 | |||
176 | . = VSYSCALL_ADDR; | ||
177 | .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) { | ||
178 | *(.vsyscall_0) | ||
179 | } :user | ||
180 | |||
181 | __vsyscall_0 = VSYSCALL_VIRT_ADDR; | ||
182 | |||
183 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | ||
184 | .vsyscall_fn : AT(VLOAD(.vsyscall_fn)) { | ||
185 | *(.vsyscall_fn) | ||
186 | } | ||
187 | |||
188 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | ||
189 | .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data)) { | ||
190 | *(.vsyscall_gtod_data) | ||
191 | } | ||
192 | |||
193 | vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data); | ||
194 | .vsyscall_clock : AT(VLOAD(.vsyscall_clock)) { | ||
195 | *(.vsyscall_clock) | ||
196 | } | ||
197 | vsyscall_clock = VVIRT(.vsyscall_clock); | ||
198 | |||
199 | |||
200 | .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1)) { | ||
201 | *(.vsyscall_1) | ||
202 | } | ||
203 | .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2)) { | ||
204 | *(.vsyscall_2) | ||
205 | } | ||
206 | |||
207 | .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { | ||
208 | *(.vgetcpu_mode) | ||
209 | } | ||
210 | vgetcpu_mode = VVIRT(.vgetcpu_mode); | ||
211 | |||
212 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | ||
213 | .jiffies : AT(VLOAD(.jiffies)) { | ||
214 | *(.jiffies) | ||
215 | } | ||
216 | jiffies = VVIRT(.jiffies); | ||
217 | |||
218 | .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) { | ||
219 | *(.vsyscall_3) | ||
220 | } | ||
221 | |||
222 | . = VSYSCALL_VIRT_ADDR + PAGE_SIZE; | ||
223 | |||
224 | #undef VSYSCALL_ADDR | ||
225 | #undef VSYSCALL_PHYS_ADDR | ||
226 | #undef VSYSCALL_VIRT_ADDR | ||
227 | #undef VLOAD_OFFSET | ||
228 | #undef VLOAD | ||
229 | #undef VVIRT_OFFSET | ||
230 | #undef VVIRT | ||
231 | |||
232 | #endif /* CONFIG_X86_64 */ | ||
162 | 233 | ||
163 | #ifdef CONFIG_X86_32 | 234 | #ifdef CONFIG_X86_32 |
164 | # include "vmlinux_32.lds.S" | 235 | # include "vmlinux_32.lds.S" |