ELF - efanov/mephi GitHub Wiki

$ whereis date ls
date: /usr/bin/date /usr/share/man/man1p/date.1p.gz /usr/share/man/man1/date.1.gz
ls: /usr/bin/ls /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz
$ file /usr/bin/date /usr/bin/ls
/usr/bin/date: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b4062dc9f6ed5cd4f2295c1ce1a87df22a49c606, for GNU/Linux 3.2.0, stripped
/usr/bin/ls:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b516839521ded07bb1fbd0a0276be9820ee8908e, for GNU/Linux 3.2.0, stripped
$ ldd /usr/bin/date /usr/bin/ls
/usr/bin/date:
	linux-vdso.so.1 (0x00007fff37ffd000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f92c32d8000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f92c34d9000)
/usr/bin/ls:
	linux-vdso.so.1 (0x00007fffea3ac000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f0b4438f000)
	libcap.so.2 => /lib64/libcap.so.2 (0x00007f0b44388000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f0b441be000)
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f0b44125000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f0b4411e000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0b443fc000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0b440fc000)
$ file -L /lib64/libc.so.6
/lib64/libc.so.6: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=7ca24d4dc3de9d62d9ad6bb25e5b70a3e57a342f, for GNU/Linux 3.2.0, not stripped
$ ldd /lib64/libc.so.6
	/lib64/ld-linux-x86-64.so.2 (0x00007f4f025b6000)
	linux-vdso.so.1 (0x00007ffc2cef9000)
$ file -L /lib64/ld-linux-x86-64.so.2
/lib64/ld-linux-x86-64.so.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=b840f4e4e3d577b8705f1309d8caa5172f65e11c, not stripped```sh

Virtual Dynamic Shared Object, VDSO

Starting with Pentium® II processors, Intel® introduced a Fast System Call facility to speed up system calls using the SYSENTER and SYSEXIT instructions instead of interrupts.

The library that you see as linux-vdso.so.1 is a virtual library, or Virtual Dynamic Shared Object, that is located only in each program’s address space. Some systems call this linux-gate.so.1. This virtual library provides the necessary logic to allow user programs to access system functions through the fastest means available on the particular processor, either interrupt, or with most newer processors, fast system call.

https://developer.ibm.com/tutorials/l-lpic1-102-3/

$ ldconfig -p | head
1204 libs found in cache `/etc/ld.so.cache'
	p11-kit-trust.so (libc6,x86-64) => /lib64/p11-kit-trust.so
	libzstd.so.1 (libc6,x86-64) => /lib64/libzstd.so.1
	libzmf-0.0.so.0 (libc6,x86-64) => /lib64/libzmf-0.0.so.0
	libzhuyin.so.13 (libc6,x86-64) => /lib64/libzhuyin.so.13
	libzck.so.1 (libc6,x86-64) => /lib64/libzck.so.1
	libzapojit-0.0.so.0 (libc6,x86-64) => /lib64/libzapojit-0.0.so.0
	libz.so.1 (libc6,x86-64) => /lib64/libz.so.1
	libyelp.so.0 (libc6,x86-64) => /lib64/libyelp.so.0
	libyaml-0.so.2 (libc6,x86-64) => /lib64/libyaml-0.so.2