Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net
[pandora-kernel.git] / arch / x86 / kernel / vmlinux.lds.S
index 89aed99..0f703f1 100644 (file)
@@ -71,7 +71,6 @@ PHDRS {
        text PT_LOAD FLAGS(5);          /* R_E */
        data PT_LOAD FLAGS(6);          /* RW_ */
 #ifdef CONFIG_X86_64
-       user PT_LOAD FLAGS(5);          /* R_E */
 #ifdef CONFIG_SMP
        percpu PT_LOAD FLAGS(6);        /* RW_ */
 #endif
@@ -154,56 +153,25 @@ SECTIONS
 
 #ifdef CONFIG_X86_64
 
-#define VSYSCALL_ADDR (-10*1024*1024)
-
-#define VLOAD_OFFSET (VSYSCALL_ADDR - __vsyscall_0 + LOAD_OFFSET)
-#define VLOAD(x) (ADDR(x) - VLOAD_OFFSET)
-
-#define VVIRT_OFFSET (VSYSCALL_ADDR - __vsyscall_0)
-#define VVIRT(x) (ADDR(x) - VVIRT_OFFSET)
-#define EMIT_VVAR(x, offset) .vsyscall_var_ ## x       \
-       ADDR(.vsyscall_0) + offset                      \
-       : AT(VLOAD(.vsyscall_var_ ## x)) {              \
-               *(.vsyscall_var_ ## x)                  \
-       }                                               \
-       x = VVIRT(.vsyscall_var_ ## x);
-
-       . = ALIGN(4096);
-       __vsyscall_0 = .;
-
-       . = VSYSCALL_ADDR;
-       .vsyscall_0 : AT(VLOAD(.vsyscall_0)) {
-               *(.vsyscall_0)
-       } :user
-
-       . = ALIGN(L1_CACHE_BYTES);
-       .vsyscall_fn : AT(VLOAD(.vsyscall_fn)) {
-               *(.vsyscall_fn)
-       }
-
-       .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1)) {
-               *(.vsyscall_1)
-       }
-       .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2)) {
-               *(.vsyscall_2)
-       }
+       . = ALIGN(PAGE_SIZE);
+       __vvar_page = .;
 
-       .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) {
-               *(.vsyscall_3)
-       }
+       .vvar : AT(ADDR(.vvar) - LOAD_OFFSET) {
+               /* work around gold bug 13023 */
+               __vvar_beginning_hack = .;
 
+               /* Place all vvars at the offsets in asm/vvar.h. */
+#define EMIT_VVAR(name, offset)                        \
+               . = __vvar_beginning_hack + offset;     \
+               *(.vvar_ ## name)
 #define __VVAR_KERNEL_LDS
 #include <asm/vvar.h>
 #undef __VVAR_KERNEL_LDS
+#undef EMIT_VVAR
 
-       . = __vsyscall_0 + PAGE_SIZE;
+       } :data
 
-#undef VSYSCALL_ADDR
-#undef VLOAD_OFFSET
-#undef VLOAD
-#undef VVIRT_OFFSET
-#undef VVIRT
-#undef EMIT_VVAR
+       . = ALIGN(__vvar_page + PAGE_SIZE, PAGE_SIZE);
 
 #endif /* CONFIG_X86_64 */