]> sourceware.org Git - glibc.git/blob - sysdeps/unix/sysv/linux/dl-vdso-setup.h
elf: Move vDSO setup to rtld (BZ#24967)
[glibc.git] / sysdeps / unix / sysv / linux / dl-vdso-setup.h
1 /* ELF symbol initialization functions for VDSO objects. Linux version.
2 Copyright (C) 2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
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
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _DL_VDSO_INIT_H
20 #define _DL_VDSO_INIT_H
21
22 /* Initialize the VDSO functions pointers. */
23 static inline void __attribute__ ((always_inline))
24 setup_vdso_pointers (void)
25 {
26 #ifdef HAVE_CLOCK_GETTIME_VSYSCALL
27 GLRO(dl_vdso_clock_gettime) = dl_vdso_vsym (HAVE_CLOCK_GETTIME_VSYSCALL);
28 #endif
29 #ifdef HAVE_GETTIMEOFDAY_VSYSCALL
30 GLRO(dl_vdso_gettimeofday) = dl_vdso_vsym (HAVE_GETTIMEOFDAY_VSYSCALL);
31 #endif
32 #ifdef HAVE_TIME_VSYSCALL
33 GLRO(dl_vdso_time) = dl_vdso_vsym (HAVE_TIME_VSYSCALL);
34 #endif
35 #ifdef HAVE_GETCPU_VSYSCALL
36 GLRO(dl_vdso_getcpu) = dl_vdso_vsym (HAVE_GETCPU_VSYSCALL);
37 #endif
38 #ifdef HAVE_CLOCK_GETRES_VSYSCALL
39 GLRO(dl_vdso_clock_getres) = dl_vdso_vsym (HAVE_CLOCK_GETRES_VSYSCALL);
40 #endif
41 #ifdef HAVE_GET_TBFREQ
42 GLRO(dl_vdso_get_tbfreq) = dl_vdso_vsym (HAVE_GET_TBFREQ);
43 #endif
44 #ifdef HAVE_SIGTRAMP_RT64
45 GLRO(dl_vdso_sigtramp_rt64) = dl_vdso_vsym (HAVE_SIGTRAMP_RT64);
46 #endif
47 #ifdef HAVE_SIGTRAMP_RT32
48 GLRO(dl_vdso_sigtramp_rt32) = dl_vdso_vsym (HAVE_SIGTRAMP_RT32);
49 #endif
50 #ifdef HAVE_SIGTRAMP_32
51 GLRO(dl_vdso_sigtramp_32) = dl_vdso_vsym (HAVE_SIGTRAMP_32);
52 #endif
53 }
54
55 #endif
This page took 0.038242 seconds and 5 git commands to generate.