UnderOverLinkProblems: Difference between revisions

From ALT Linux Wiki
(New page: Category:Devel == Underlinking == Underlinking is the situation when ELF shared library contains unresolved symbols. Underlinking causes the following problems: * Full link is perfor...)
 
(→‎Resources: +links)
 
Line 31: Line 31:
* [http://people.redhat.com/drepper/dsohowto.pdf How to write shared libraries]
* [http://people.redhat.com/drepper/dsohowto.pdf How to write shared libraries]
* [http://lists.debian.org/debian-devel-announce/2005/11/msg00016.html freetype transition nightmare in Debian]
* [http://lists.debian.org/debian-devel-announce/2005/11/msg00016.html freetype transition nightmare in Debian]
* Discussion in [http://lists.altlinux.org/pipermail/sisyphus/ sisyphus mailing list] (russian): [http://lists.altlinux.org/pipermail/sisyphus/2007-February/093196.html 1] [http://lists.altlinux.org/pipermail/sisyphus/2007-February/093198.html 2]
* ALT Linux:
** Discussion in [http://lists.altlinux.org/pipermail/sisyphus/ sisyphus mailing list] (russian): [http://lists.altlinux.org/pipermail/sisyphus/2007-February/093196.html 1] [http://lists.altlinux.org/pipermail/sisyphus/2007-February/093198.html 2]
** [http://www.altlinux.org/UpStream/AsNeeded Russian wiki page]
* Mandriva Wiki:
* Mandriva Wiki:
** [http://wiki.mandriva.com/en/Underlinking Underlinking]
** [http://wiki.mandriva.com/en/Underlinking Underlinking]
** [http://wiki.mandriva.com/en/Overlinking Overlinking]
** [http://wiki.mandriva.com/en/Overlinking Overlinking]
* Gentoo:
** http://www.gentoo.org/proj/en/qa/asneeded.xml

Latest revision as of 19:02, 8 January 2009

Underlinking

Underlinking is the situation when ELF 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 and their symbol versioning is already lost, so it may result in runtime errors, when dynamic loader loads incompatible versions of libraries or libraries with incompatible symbol versioning.
  • It's not possible to prelink underlinked libraries.
  • It's not possible to link with underlinked libraries in --as-needed mode.

Sources of Underlinking

  • Errors in makefiles.
  • ?

Overlinking

Overlinking is linking ELF shared library or executable with the libraries which are not used directly by the library/binary itself. This causes the following problems:

  • Unused libraries waste process (and sometimes system) memory.
  • 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.
  • 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 may cause runtime errors.

Sources of Overlinking

  • Libraries providing wrong pkg-config or /usr/bin/*-config files.
  • ?

Resources