Skip to contentSkip to conversation

Fix hardcoded value in vsyscall.lds

PATCH New Brian Gerst 1 participant 1 message Aug 28, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix hardcoded value in vsyscall.lds

The last attempt to clean this up still left a hardcoded constant (the offset from __FIXADDR_TOP). This patch moves VSYSCALL_BASE to asm-offsets.c.

--
Brian Gerst

arch/i386/kernel/asm-offsets.c +1 -0
diff -urN linux-2.6.9-rc1-bk/arch/i386/kernel/asm-offsets.c linux/arch/i386/kernel/asm-offsets.c
@@ -62,4 +62,5 @@
 		 sizeof(struct tss_struct));
 
 	DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
+	DEFINE(VSYSCALL_BASE, __fix_to_virt(FIX_VSYSCALL));
 }
arch/i386/kernel/vsyscall.lds.S +1 -3
diff -urN linux-2.6.9-rc1-bk/arch/i386/kernel/vsyscall.lds.S linux/arch/i386/kernel/vsyscall.lds.S
@@ -3,9 +3,7 @@
  * object prelinked to its virtual address, and with only one read-only
  * segment (that fits in one page).  This script controls its layout.
  */
-#include <asm/fixmap.h>
-
-VSYSCALL_BASE = __FIXADDR_TOP - 0x1000;
+#include <asm/asm_offsets.h>
 
 SECTIONS
 {