From abee61217acc462ab077348d1af1ae27c95399c5 Mon Sep 17 00:00:00 2001 From: Brian Gerst Date: Mon, 30 Aug 2004 20:39:56 -0700 Subject: [PATCH] [PATCH] 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. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/kernel/asm-offsets.c | 1 + arch/i386/kernel/vsyscall.lds.S | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c index 6248bf2575845..38d82e38093b6 100644 --- a/arch/i386/kernel/asm-offsets.c +++ b/arch/i386/kernel/asm-offsets.c @@ -62,4 +62,5 @@ void foo(void) sizeof(struct tss_struct)); DEFINE(PAGE_SIZE_asm, PAGE_SIZE); + DEFINE(VSYSCALL_BASE, __fix_to_virt(FIX_VSYSCALL)); } diff --git a/arch/i386/kernel/vsyscall.lds.S b/arch/i386/kernel/vsyscall.lds.S index a4421421e4001..3a8329d6536e7 100644 --- a/arch/i386/kernel/vsyscall.lds.S +++ b/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 - -VSYSCALL_BASE = __FIXADDR_TOP - 0x1000; +#include SECTIONS { -- 2.53.0