On an ELF system, if two shared libraries have the same subset of an application binary interface (ABI), those two shared libraries are interchangable for the executables which only use the subet of the ABI, assuming they have the same functionality.
When a library is changed, as long as the new ABI is 100% compatible with the previous version, all executables linked with the previous version of the shared library will run fine with the new shared library. To support this, the library foo has to be maintained with care:
# gcc -shared -Wl,-soname,libfoo.so.major \ -o libfoo.so.major.minor.patch-level libfoo.oThen the dynamic linker will try to locate and map in libfoo.so.major at run time regardless the actual shared library filename libfoo.so.major.minor.patch-level is used at link time.
# ln -s libfoo.so.major.minor.patch-level libfoo.so.major
While searching for a shared library, the Linux linker will use the latest shared library which has the highest major, minor and patch level version numbers.