The vDSO (virtual dynamic shared object) is a small shared library
that the kernel maps R/O into the address space of all processes on
image activation. The vDSO is a fully formed ELF image, shared by all
processes with the same ABI, has no process private data.
The primary purpose of the vDSO:
- non-executable stack, signal trampolines not copied to the stack;
- signal trampolines unwind, mandatory for the NPTL;
- to avoid contex-switch overhead frequently used system calls can be implemented in the vDSO: for now gettimeofday, clock_gettime.
The first two have been implemented, so add the implementation of system
System calls implemenation based on a native timekeeping code with some
- ifunc can't be used, as vDSO r/o mapped to the process VA and rtld can't relocate symbols;
- reading HPET memory is not implemented for now (TODO).
In case on any error vDSO system calls fallback to the kernel system
calls. For unimplemented vDSO system calls added prototypes which call
corresponding kernel system call.
PS. arm64 compile tested only.