hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/tools/testing/selftests/vDSO/parse_vdso.c
....@@ -21,29 +21,7 @@
2121 #include <limits.h>
2222 #include <elf.h>
2323
24
-/*
25
- * To use this vDSO parser, first call one of the vdso_init_* functions.
26
- * If you've already parsed auxv, then pass the value of AT_SYSINFO_EHDR
27
- * to vdso_init_from_sysinfo_ehdr. Otherwise pass auxv to vdso_init_from_auxv.
28
- * Then call vdso_sym for each symbol you want. For example, to look up
29
- * gettimeofday on x86_64, use:
30
- *
31
- * <some pointer> = vdso_sym("LINUX_2.6", "gettimeofday");
32
- * or
33
- * <some pointer> = vdso_sym("LINUX_2.6", "__vdso_gettimeofday");
34
- *
35
- * vdso_sym will return 0 if the symbol doesn't exist or if the init function
36
- * failed or was not called. vdso_sym is a little slow, so its return value
37
- * should be cached.
38
- *
39
- * vdso_sym is threadsafe; the init functions are not.
40
- *
41
- * These are the prototypes:
42
- */
43
-extern void vdso_init_from_auxv(void *auxv);
44
-extern void vdso_init_from_sysinfo_ehdr(uintptr_t base);
45
-extern void *vdso_sym(const char *version, const char *name);
46
-
24
+#include "parse_vdso.h"
4725
4826 /* And here's the code. */
4927 #ifndef ELF_BITS