From 7f3646aa16f496201e045183402c6614fa27b0c7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jan 2008 13:30:41 +0100 Subject: 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 Cc: Andrew Morton Cc: Linus Torvalds Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/vdso.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/asm-x86/vdso.h (limited to 'include') diff --git a/include/asm-x86/vdso.h b/include/asm-x86/vdso.h new file mode 100644 index 000000000000..9379ec06fd1f --- /dev/null +++ b/include/asm-x86/vdso.h @@ -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 */ -- cgit v1.2.3