Explanation of ldd output Explanation of ldd output unix unix

Explanation of ldd output


The most important part of that output is linux-vdso. VDSO stands for Virtual Dynamic Shared Object - it's an way to export kernel space routines to userspace. The main reason is to reduce the system call overhead. Typically when a system call happens it requires some expensive operations like switching mode from user to kernel, copying data from userspace to kernelspace etc. To reduce these sorts of overhead VDSO is used, just by reading that vdso memory space result could be extracted i.e it's possible to gettimeofday() without doing a real system call!

Note, not all system calls have VDSO support, only system calls like getcpu(), gettimeofday(), time() etc. which is an extremely fast way to get these thing done. Also the memory address linux-vdso.so.1 points is randomized, on different ldd invocation you'll see linux-vdso.so.1 points to different memory location. This has been done as if no one can predict the address up front.