x86 vDSO: use vdso-syms.lds
[sfrench/cifs-2.6.git] / include / asm-x86 / vdso.h
diff --git a/include/asm-x86/vdso.h b/include/asm-x86/vdso.h
new file mode 100644 (file)
index 0000000..9379ec0
--- /dev/null
@@ -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 */