“Shared libraries are not a good thing in general”
As Linus points out, the utility of shared libraries depends on the situation. Widely used libraries like libxcb, libGL, and zlib that tend to have reasonably stable ABIs are good candidates for sharing, while the &quot;couple of libraries that <i>nobody</i> else used. Literally <i>nobody</i>&quot; should obviously be statically linked. Software engineering is mostly about learning how to choose which method is appropriate for the current project.<p>However, there important advantage of using .so files instead of building into a big statically linked binary is <i>NOT</i> that a library can be shared between different programs! The important benefit is <i>dynamic linking</i>. The ability to change which library is being used <i>without</i> needing to rebuild the main program is really important. Maybe rebuilding the program isn&#x27;t practical. Maybe rebuilding the program <i>isn&#x27;t possible</i> because it&#x27;s closed&#x2F;proprietary or the source no longer exists. If the program is statically linked, then nothing can happen - either it works or it doesn&#x27;t. With dynamic linking, changes are possible by changing which library is loaded. I needed to use this ability last week to work around a problem in a closed, proprietary program that is no longer supported. While the workaround was an ugly LD_LIBRARY_PATH hack, at least it got the program to run.