xref: /linux/arch/x86/include/asm/vdso.h (revision b0b49f2673f011cad7deeabf7a683b388c351278)
11965aae3SH. Peter Anvin #ifndef _ASM_X86_VDSO_H
21965aae3SH. Peter Anvin #define _ASM_X86_VDSO_H
3bb898558SAl Viro 
4bb898558SAl Viro #if defined CONFIG_X86_32 || defined CONFIG_COMPAT
5bb898558SAl Viro /*
6bb898558SAl Viro  * Given a pointer to the vDSO image, find the pointer to VDSO32_name
7bb898558SAl Viro  * as that symbol is defined in the vDSO sources or linker script.
8bb898558SAl Viro  */
9bb898558SAl Viro #define VDSO32_SYMBOL(base, name)					\
10bb898558SAl Viro ({									\
11bb898558SAl Viro 	extern const char VDSO32_##name[];				\
12*b0b49f26SAndy Lutomirski 	(void __user *)(VDSO32_##name + (unsigned long)(base));		\
13bb898558SAl Viro })
14bb898558SAl Viro #endif
15bb898558SAl Viro 
16bb898558SAl Viro /*
17bb898558SAl Viro  * These symbols are defined with the addresses in the vsyscall page.
18bb898558SAl Viro  * See vsyscall-sigreturn.S.
19bb898558SAl Viro  */
20bb898558SAl Viro extern void __user __kernel_sigreturn;
21bb898558SAl Viro extern void __user __kernel_rt_sigreturn;
22bb898558SAl Viro 
23bb898558SAl Viro /*
24bb898558SAl Viro  * These symbols are defined by vdso32.S to mark the bounds
25bb898558SAl Viro  * of the ELF DSO images included therein.
26bb898558SAl Viro  */
27bb898558SAl Viro extern const char vdso32_int80_start, vdso32_int80_end;
28bb898558SAl Viro extern const char vdso32_syscall_start, vdso32_syscall_end;
29bb898558SAl Viro extern const char vdso32_sysenter_start, vdso32_sysenter_end;
30bb898558SAl Viro 
311965aae3SH. Peter Anvin #endif /* _ASM_X86_VDSO_H */
32