From 6c3652efcafa6a6d795093362cb4290c84994b5c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jan 2008 13:30:42 +0100 Subject: x86 vDSO: i386 vdso32 This makes the i386 kernel use the new vDSO build in arch/x86/vdso/vdso32/ to replace the old one from arch/x86/kernel/. Signed-off-by: Roland McGrath Cc: Andrew Morton Cc: Linus Torvalds Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/elf.h | 13 +++---------- include/asm-x86/vdso.h | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h index cd3204ebbbdd..70edff2d5671 100644 --- a/include/asm-x86/elf.h +++ b/include/asm-x86/elf.h @@ -78,6 +78,7 @@ typedef struct user_fxsr_struct elf_fpxregset_t; #include #include /* for savesegment */ #include +#include /* * This is used to ensure we don't load something for the wrong architecture. @@ -247,17 +248,9 @@ extern int dump_task_extended_fpu (struct task_struct *, #define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) #define VDSO_CURRENT_BASE ((unsigned long)current->mm->context.vdso) -#define VDSO_PRELINK 0 -#define VDSO_SYM(x) \ - (VDSO_CURRENT_BASE + (unsigned long)(x) - VDSO_PRELINK) - -#define VDSO_HIGH_EHDR ((const struct elfhdr *) VDSO_HIGH_BASE) -#define VDSO_EHDR ((const struct elfhdr *) VDSO_CURRENT_BASE) - -extern void __kernel_vsyscall; - -#define VDSO_ENTRY VDSO_SYM(&__kernel_vsyscall) +#define VDSO_ENTRY \ + ((unsigned long) VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall)) /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ diff --git a/include/asm-x86/vdso.h b/include/asm-x86/vdso.h index 9379ec06fd1f..629bcb6e8e45 100644 --- a/include/asm-x86/vdso.h +++ b/include/asm-x86/vdso.h @@ -1,6 +1,7 @@ #ifndef _ASM_X86_VDSO_H #define _ASM_X86_VDSO_H 1 +#ifdef CONFIG_X86_64 extern const char VDSO64_PRELINK[]; /* @@ -10,5 +11,18 @@ extern const char VDSO64_PRELINK[]; #define VDSO64_SYMBOL(base, name) ({ \ extern const char VDSO64_##name[]; \ (void *) (VDSO64_##name - VDSO64_PRELINK + (unsigned long) (base)); }) +#endif + +#if defined CONFIG_X86_32 || defined CONFIG_COMPAT +extern const char VDSO32_PRELINK[]; + +/* + * Given a pointer to the vDSO image, find the pointer to VDSO32_name + * as that symbol is defined in the vDSO sources or linker script. + */ +#define VDSO32_SYMBOL(base, name) ({ \ + extern const char VDSO32_##name[]; \ + (void *) (VDSO32_##name - VDSO32_PRELINK + (unsigned long) (base)); }) +#endif #endif /* asm-x86/vdso.h */ -- cgit v1.2.3-59-g8ed1b