xref: /openbmc/linux/Documentation/ABI/stable/vdso (revision 5b448065)
1What:		vDSO
2Date:		July 2011
3KernelVersion:	3.0
4Contact:	Andy Lutomirski <luto@kernel.org>
5Description:
6
7On some architectures, when the kernel loads any userspace program it
8maps an ELF DSO into that program's address space.  This DSO is called
9the vDSO and it often contains useful and highly-optimized alternatives
10to real syscalls.
11
12These functions are called just like ordinary C function according to
13your platform's ABI.  Call them from a sensible context.  (For example,
14if you set CS on x86 to something strange, the vDSO functions are
15within their rights to crash.)  In addition, if you pass a bad
16pointer to a vDSO function, you might get SIGSEGV instead of -EFAULT.
17
18To find the DSO, parse the auxiliary vector passed to the program's
19entry point.  The AT_SYSINFO_EHDR entry will point to the vDSO.
20
21The vDSO uses symbol versioning; whenever you request a symbol from the
22vDSO, specify the version you are expecting.
23
24Programs that dynamically link to glibc will use the vDSO automatically.
25Otherwise, you can use the reference parser in
26tools/testing/selftests/vDSO/parse_vdso.c.
27
28Unless otherwise noted, the set of symbols with any given version and the
29ABI of those symbols is considered stable.  It may vary across architectures,
30though.
31
32Note:
33 As of this writing, this ABI documentation as been confirmed for x86_64.
34 The maintainers of the other vDSO-using architectures should confirm
35 that it is correct for their architecture.
36