diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/dl-vdso.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-vdso.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-vdso.h b/sysdeps/unix/sysv/linux/dl-vdso.h index 5e40eac3ee..19ffd30c7e 100644 --- a/sysdeps/unix/sysv/linux/dl-vdso.h +++ b/sysdeps/unix/sysv/linux/dl-vdso.h @@ -19,16 +19,25 @@ #ifndef _DL_VDSO_H #define _DL_VDSO_H 1 -#include <assert.h> #include <ldsodefs.h> #include <dl-hash.h> -#include <libc-vdso.h> /* Functions for resolving symbols in the VDSO link map. */ extern void *_dl_vdso_vsym (const char *name, const struct r_found_version *version) attribute_hidden; +/* If the architecture support vDSO it should define which is the expected + kernel version and hash value through both VDSO_NAME and VDSO_HASH + (usually defined at architecture sysdep.h). */ + +#ifndef VDSO_NAME +# define VDSO_NAME "LINUX_0.0" +#endif +#ifndef VDSO_HASH +# define VDSO_HASH 0 +#endif + static inline void * get_vdso_symbol (const char *symbol) { @@ -36,4 +45,12 @@ get_vdso_symbol (const char *symbol) return _dl_vdso_vsym (symbol, &rfv); } +static inline void * +get_vdso_mangle_symbol (const char *symbol) +{ + void *vdsop = get_vdso_symbol (symbol); + PTR_MANGLE (vdsop); + return vdsop; +} + #endif /* dl-vdso.h */ |