![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 0003 #ifndef PARSE_VDSO_H 0004 #define PARSE_VDSO_H 0005 0006 #include <stdint.h> 0007 0008 /* 0009 * To use this vDSO parser, first call one of the vdso_init_* functions. 0010 * If you've already parsed auxv, then pass the value of AT_SYSINFO_EHDR 0011 * to vdso_init_from_sysinfo_ehdr. Otherwise pass auxv to vdso_init_from_auxv. 0012 * Then call vdso_sym for each symbol you want. For example, to look up 0013 * gettimeofday on x86_64, use: 0014 * 0015 * <some pointer> = vdso_sym("LINUX_2.6", "gettimeofday"); 0016 * or 0017 * <some pointer> = vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); 0018 * 0019 * vdso_sym will return 0 if the symbol doesn't exist or if the init function 0020 * failed or was not called. vdso_sym is a little slow, so its return value 0021 * should be cached. 0022 * 0023 * vdso_sym is threadsafe; the init functions are not. 0024 * 0025 * These are the prototypes: 0026 */ 0027 void *vdso_sym(const char *version, const char *name); 0028 void vdso_init_from_sysinfo_ehdr(uintptr_t base); 0029 void vdso_init_from_auxv(void *auxv); 0030 0031 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |