vdso.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _ASM_X86_VDSO_H
  2. #define _ASM_X86_VDSO_H
  3. #ifdef CONFIG_X86_64
  4. extern const char VDSO64_PRELINK[];
  5. /*
  6. * Given a pointer to the vDSO image, find the pointer to VDSO64_name
  7. * as that symbol is defined in the vDSO sources or linker script.
  8. */
  9. #define VDSO64_SYMBOL(base, name) \
  10. ({ \
  11. extern const char VDSO64_##name[]; \
  12. (void *)(VDSO64_##name - VDSO64_PRELINK + (unsigned long)(base)); \
  13. })
  14. #endif
  15. #if defined CONFIG_X86_32 || defined CONFIG_COMPAT
  16. extern const char VDSO32_PRELINK[];
  17. /*
  18. * Given a pointer to the vDSO image, find the pointer to VDSO32_name
  19. * as that symbol is defined in the vDSO sources or linker script.
  20. */
  21. #define VDSO32_SYMBOL(base, name) \
  22. ({ \
  23. extern const char VDSO32_##name[]; \
  24. (void *)(VDSO32_##name - VDSO32_PRELINK + (unsigned long)(base)); \
  25. })
  26. #endif
  27. /*
  28. * These symbols are defined with the addresses in the vsyscall page.
  29. * See vsyscall-sigreturn.S.
  30. */
  31. extern void __user __kernel_sigreturn;
  32. extern void __user __kernel_rt_sigreturn;
  33. /*
  34. * These symbols are defined by vdso32.S to mark the bounds
  35. * of the ELF DSO images included therein.
  36. */
  37. extern const char vdso32_int80_start, vdso32_int80_end;
  38. extern const char vdso32_syscall_start, vdso32_syscall_end;
  39. extern const char vdso32_sysenter_start, vdso32_sysenter_end;
  40. #endif /* _ASM_X86_VDSO_H */