x86 vDSO: use vdso-syms.lds

This patch changes the kernel's references to addresses in the vDSO image
to be based on the symbols defined by vdso-syms.lds instead of the old
vdso-syms.o symbols.  This is all wrapped up in a macro defined by the new
asm-x86/vdso.h header; that's the only place in the kernel source that has
to know the details of the scheme for getting vDSO symbol values.

Signed-off-by: Roland McGrath <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
Roland McGrath 2008-01-30 13:30:41 +01:00 • committed by Ingo Molnar
commit 7f3646aa16
4 changed files with 22 additions and 15 deletions

14
include/asm-x86/vdso.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef _ASM_X86_VDSO_H
#define _ASM_X86_VDSO_H 1
extern const char VDSO64_PRELINK[];
/*
* Given a pointer to the vDSO image, find the pointer to VDSO64_name
* as that symbol is defined in the vDSO sources or linker script.
*/
#define VDSO64_SYMBOL(base, name) ({ \
extern const char VDSO64_##name[]; \
(void *) (VDSO64_##name - VDSO64_PRELINK + (unsigned long) (base)); })
#endif /* asm-x86/vdso.h */