Draft
Underlinking
Underlinking is the situation when shared library contains unresolved symbols. Underlinking causes the following problems:
- Full link is performed by the final binary linking. At this stage all the knowledge about compatible versions of libraries is already lost, so it may result in runtime errors, when binary links incompatible versions of libraries.
- Symbol versioning does not work with underlinked binaries.
- It's not possible to prelink underlinked libraries.
- It's not possible to link with underlinked libraries in --as-needed mode.
Sources of Underlinking
Overlinking
Overlinking is linking shared library or binary with the libraries which are not used directly by the library/binary itself. The problems of overlinking:
- Unused libraries slow down dynamic linker.
- Unused libraries result in the excessive packages inderdependencies, which makes library transitions long and painful. Excessive dependencies also may waste disk space.
- Unused libraries waste process memory.
- Dependencies to the different versions of the same library in the resulting binary may result in loading several versions of the same library simultaneously which will cause runtime errors.
Sources of Overlinking
- Libraries providing wrong pkg-config files.
- ?
Resources