]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
x86_64 vDSO: use initdata
authorRoland McGrath <roland@redhat.com>
Mon, 28 Apr 2008 01:45:38 +0000 (18:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 20:49:35 +0000 (13:49 -0700)
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>
arch/x86/kernel/vmlinux_64.lds.S
arch/x86/vdso/vdso.S

index b7ab3c335fae73242ace2deec574165f05ce774a..fad3674b06a58f990cabab44bd61910f975a6682 100644 (file)
@@ -209,12 +209,6 @@ SECTIONS
        EXIT_DATA
   }
 
-/* vdso blob that is mapped into user space */
-  vdso_start = . ;
-  .vdso  : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) }
-  . = ALIGN(PAGE_SIZE);
-  vdso_end = .;
-
 #ifdef CONFIG_BLK_DEV_INITRD
   . = ALIGN(PAGE_SIZE);
   __initramfs_start = .;
index 4b1620a1529e82863a18a96fc8507afbc1734b5d..1d3aa6b8718115fa8f7cadc65c04145b8b79bbcd 100644 (file)
@@ -1,2 +1,10 @@
-       .section ".vdso","a"
+#include <linux/init.h>
+
+__INITDATA
+
+       .globl vdso_start, vdso_end
+vdso_start:
        .incbin "arch/x86/vdso/vdso.so"
+vdso_end:
+
+__FINIT