3 ms·
"Libraries are just a bundle of .o files" Static libraries are more or less that yes (at least, that mental model is sufficient for pretty much all day to day
by roel_v 8y ago
"Libraries are just a bundle of .o files"
Static libraries are more or less that yes (at least, that mental model is sufficient for pretty much all day to day use of them), but dynamic libraries aren't, at all.
As an aside, I found it very weird that the OP claimed that 'nobody uses static linking'. Wut? Static linking is everywhere (so is dynamic linking, of course, but implying that one is merely a quaint remainder from the past is just so odd).
- aidenn0 8y agoThere has been a heavy bias towards shared objects in glibc and the GNU userspace utilities for a long time. Today that mostly means dynamic libraries (there are also statically linked shared objects, but those are mostly a quaint reminder of the past). I don't hate dynamic linking as much as I used to, but it is still a peeve of mine. Linux is one of the most backwards compatible kernels, but the heavy usage of dynamic linking means that a linux program from 20 years ago either won't work at all, or will be buggy. A statically linked program from 20 years ago will work (but possibly won't have sound; though it's possible to get either alsa or pulse audio to emulate OSS and then even sound will work).