Say we are talking about libtest . If you look around, you'll see libtest.so , which is a link to libtest.so.1 , which in turn refers to libtest.so.1.5 .
In this case, the executable using libtest will be bound to libtest.so.1 (this is written to the executable, see ldd(1) ). If your distribution changes libtest to fix errors, the new version may give libtest.so.1.6 . As long as no changes are made to ABI, everything is working fine. And the fact that there are no API changes is signaled by an unchanged version number 1.
Suppose busy libtest beavers libtest up with a new, all-brilliant, rewritten library from scratch with a modified ABI. As the ABI changes, they change the version number to 2. You install it, and now you have the chain libtest.so --> libtest.so.2 --> libtest.so.2.1 . Please note: now you have installed versions 1 and 2. Your previous programs still work fine using libtest.so.1 , but if you compile a new program, the compiler (linker, really) will pick libtest.so and thus indicate executable file on the new libtest.so.2.1 .
Please note that therefore version numbers should not have anything to do with source code version numbers; the primary number is the ABI version, the minor number is optional and can be used to track changes. So here (Fedora 20) I use systemd-libs-208-15.fc20.x86_64 , which provides libsystemd-daemon.so.0.0.10 .
vonbrand
source share