Static linking considered harmful
Olivier Galibert
galibert at pobox.com
Tue Nov 28 17:30:47 UTC 2006
On Tue, Nov 28, 2006 at 10:44:29AM -0500, Jakub Jelinek wrote:
> For programs which don't have such requirements (the vast majority),
> an analysis of the libraries the (dynamically linked) program links against
> (or dlopens) is needed. There are libraries which keep ABI stable and
> maintain backwards compatibility (either through symbol versioning or
> by strictly only adding new symbols, never changing the semantics of
> old entry points or removing symbols), there are libraries that do that
> mostly, but from time to time bump SONAME, there are libraries which
> change their ABI (and bump SONAME) often.
>
> For the first category (e.g. glibc, libX11), the rule of thumb is
> link dynamically, don't include the libraries with your program,
> compile and link against the oldest version you still want to support.
Ah but you see, glibc does not maintain backwards compatilibity.
./nscube: relocation error: ./nscube: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
Thankfully, that ISV also provided a statically linked version.
OG.
More information about the fedora-devel-list
mailing list