diff options
author | Roland McGrath <roland@redhat.com> | 2008-04-27 21:45:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 16:49:35 -0400 |
commit | d9dedc13851f9cbd568fbc631a17b0be83404957 (patch) | |
tree | 4ced6cf6715c0805d1f15fd414b0c97a69fe6b1c /arch/x86 | |
parent | 7f6c69dcf40a227b8c98e5619367269b427164d7 (diff) |
x86_64 vDSO: use initdata
The 64-bit vDSO image is in a special ".vdso" section for no reason
I can determine. Furthermore, the location of the vdso_end symbol
includes some wrongly-calculated padding space in the image, which
is then (correctly) rounded to page size, resulting in an extra page
of zeros in the image mapped in to user processes.
This changes it to put the vdso.so image into normal initdata as we
have always done for the 32-bit vDSO images. The extra padding is
gone, so the user VMA is one page instead of two. The image that
was already copied around at boot time is now in initdata, so we
recover that wasted space after boot.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/vmlinux_64.lds.S | 6 | ||||
-rw-r--r-- | arch/x86/vdso/vdso.S | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S index b7ab3c335fae..fad3674b06a5 100644 --- a/arch/x86/kernel/vmlinux_64.lds.S +++ b/arch/x86/kernel/vmlinux_64.lds.S | |||
@@ -209,12 +209,6 @@ SECTIONS | |||
209 | EXIT_DATA | 209 | EXIT_DATA |
210 | } | 210 | } |
211 | 211 | ||
212 | /* vdso blob that is mapped into user space */ | ||
213 | vdso_start = . ; | ||
214 | .vdso : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) } | ||
215 | . = ALIGN(PAGE_SIZE); | ||
216 | vdso_end = .; | ||
217 | |||
218 | #ifdef CONFIG_BLK_DEV_INITRD | 212 | #ifdef CONFIG_BLK_DEV_INITRD |
219 | . = ALIGN(PAGE_SIZE); | 213 | . = ALIGN(PAGE_SIZE); |
220 | __initramfs_start = .; | 214 | __initramfs_start = .; |
diff --git a/arch/x86/vdso/vdso.S b/arch/x86/vdso/vdso.S index 4b1620a1529e..1d3aa6b87181 100644 --- a/arch/x86/vdso/vdso.S +++ b/arch/x86/vdso/vdso.S | |||
@@ -1,2 +1,10 @@ | |||
1 | .section ".vdso","a" | 1 | #include <linux/init.h> |
2 | |||
3 | __INITDATA | ||
4 | |||
5 | .globl vdso_start, vdso_end | ||
6 | vdso_start: | ||
2 | .incbin "arch/x86/vdso/vdso.so" | 7 | .incbin "arch/x86/vdso/vdso.so" |
8 | vdso_end: | ||
9 | |||
10 | __FINIT | ||