3 ms·
I think the point here is that if you are building a few binaries for a system that has severe storage constraints, shared libraries might be a way to reduce di
by MayeulC 9y ago
I think the point here is that if you are building a few binaries for a system that has severe storage constraints, shared libraries might be a way to reduce disk usage.
If the library is stable and installed system-wide, it shouldn't be much harder to copy binaries around, and it makes each of them smaller.
Of course, there is also the dual, busybox-way of embedding everything into a single binary. This should lead to even more gains, but moves complexity elsewhere: calling the binaries, making sure no symbols conflicts, more complex compilation chain, etc. Even better gains can be achieved if every tool is developed simultaneously, and is reusing utility functions from other parts of the project (which is actually what shared libraries do, to a lesser extent).