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