vdso: virtual dynamic shared object

目的是解决用户态频繁调用内核接口性能较低,用它来提升访问性能,目前支持接口如下:

1
2
3
4
5
6
7
8
9
10
11
test@linux:~/work/kernel/baseos/mykernel> objdump -T  ./arch/arm64/kernel/vdso/vdso.so

./arch/arm64/kernel/vdso/vdso.so: file format elf64-littleaarch64

DYNAMIC SYMBOL TABLE:
0000000000000000 g DO *ABS* 0000000000000000 LINUX_2.6.39 LINUX_2.6.39
00000000000005c8 g DF .text 0000000000000068 LINUX_2.6.39 __kernel_clock_getres
0000000000000634 g D .text 0000000000000008 LINUX_2.6.39 __kernel_rt_sigreturn
0000000000000490 g DF .text 000000000000012c LINUX_2.6.39 __kernel_gettimeofday
0000000000000308 g DF .text 0000000000000180 LINUX_2.6.39 __kernel_clock_gettime

所有用户态进程都会依赖它,名称如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
vDSO names
The name of the vDSO varies across architectures. It will often show up in things like glibc's ldd(1) output. The exact name should not matter to any code, so do not hardcode it.

user ABI vDSO name
─────────────────────────────
aarch64 linux-vdso.so.1
arm linux-vdso.so.1
ia64 linux-gate.so.1
ppc/32 linux-vdso32.so.1
ppc/64 linux-vdso64.so.1
s390 linux-vdso32.so.1
s390x linux-vdso64.so.1
sh linux-gate.so.1
i386 linux-gate.so.1
x86_64 linux-vdso.so.1
x86/x32 linux-vdso.so.1