> "DL libraries aren't really a different kind of library format (both
> static and shared libraries can be used as DL libraries);"

Library archives (.a) and shared objects (.so) differ in several ways.
Roughly speaking:

>From a file format perspective, .a files are simple collections (man ar)
of independent compiled objects, while .so files are complete libraries
produced by the linker and contain additional information which tell the
dynamic linker (ld.so) how to load and share the code.

More importantly, code which is intended to be used in shared objects
must be compiled with specific options as position-independent code,
whereas code in an archive needs not.

You can't link dynamically against a library archive, so all DL code on
Linux must be compiled as a shared object, whether it's actually shared
or not (think plugins).

As for the static use-flag: don't use it, unless you have very good
reasons to do so. It will result in a system with larger binaries and in
many cases you will *not* get true statically-linked binaries (e.g. most
of the things which link against glibc). As for dynamic linking breakage
following upgrades, IMO portage and revdep-rebuild give good enough
support for fixing that.

andrea

Reply via email to