m68k-vdso.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Resolve function pointers to VDSO functions.
  2. Copyright (C) 2010-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
  5. The GNU C Library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with the GNU C Library. If not, see
  15. <http://www.gnu.org/licenses/>. */
  16. #ifndef _M68K_VDSO_H
  17. #define _M68K_VDSO_H
  18. #ifdef SHARED
  19. # if IS_IN (rtld)
  20. # define M68K_VDSO_SYMBOL(name) __rtld_##name
  21. # define STR_M68K_VDSO_SYMBOL(name) "__rtld_" #name
  22. # else
  23. # define M68K_VDSO_SYMBOL(name) name
  24. # define STR_M68K_VDSO_SYMBOL(name) #name
  25. # endif
  26. # ifndef __ASSEMBLER__
  27. /* We define __rtld_* copies for rtld.
  28. We need them visible in libc to initialize. */
  29. # if IS_IN (rtld) || IS_IN (libc)
  30. extern void *__rtld___vdso_read_tp;
  31. extern void *__rtld___vdso_atomic_cmpxchg_32;
  32. extern void *__rtld___vdso_atomic_barrier;
  33. /* These stubs are meant to be invoked only from the assembly. */
  34. extern void __vdso_read_tp_stub (void);
  35. extern void __vdso_atomic_cmpxchg_32_stub (void);
  36. extern void __vdso_atomic_barrier_stub (void);
  37. # endif /* IS_IN (rtld) || IS_IN (libc) */
  38. /* RTLD should only use its own copies. */
  39. # if !IS_IN (rtld)
  40. extern void *__vdso_read_tp;
  41. extern void *__vdso_atomic_cmpxchg_32;
  42. extern void *__vdso_atomic_barrier;
  43. # endif /* !IS_IN (rtld) */
  44. # endif /* !__ASSEMBLER__ */
  45. #endif /* SHARED */
  46. #endif /* _M68K_VDSO_H */