3 ms·
>Executables do list their dependencies They list paths to libraries, but not the exact version that the executable depends on. It is a common occurrence for e
by charcircuit 3y ago
>Executables do list their dependencies
They list paths to libraries, but not the exact version that the executable depends on. It is a common occurrence for executables to load versions of libraries they were not designed to be used with.
- YoshiRulz 3y agoIf you're talking about ELF for desktop Linux, they for the most part don't contain file paths, and may specify the version but usually just have the major version (to allow for security updates). You can use ldd to read the list of deps and also do a dry run of fulfilling them from the search path, for example: $> ldd $(command -v ls) linux-vdso.so.1 (0x00007ffd5b3a0000) libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f6bd398c000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f6bd3780000) /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6bd39e5000)
- charcircuit 3y agoLibraries can cause bugs even if they have the same exact version as it may be compiled in a way that is not expected by the program. Ideally the list of libraries should be some form of a hash of the library to ensure it is loading exactly what it expects.