vdso.h 724 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_CSKY_VDSO_H
  3. #define __ASM_CSKY_VDSO_H
  4. #include <linux/types.h>
  5. /*
  6. * The VDSO symbols are mapped into Linux so we can just use regular symbol
  7. * addressing to get their offsets in userspace. The symbols are mapped at an
  8. * offset of 0, but since the linker must support setting weak undefined
  9. * symbols to the absolute address 0 it also happens to support other low
  10. * addresses even when the code model suggests those low addresses would not
  11. * otherwise be available.
  12. */
  13. #define VDSO_SYMBOL(base, name) \
  14. ({ \
  15. extern const char __vdso_##name[]; \
  16. (void __user *)((unsigned long)(base) + __vdso_##name); \
  17. })
  18. #endif /* __ASM_CSKY_VDSO_H */