thumb|An illustration of the linking process. Object files and [[static library|static libraries are assembled into a new library or executable]]

A linker or link editor is a computer program that combines intermediate software build files such as object and library files into a single executable file such as a program or library. A linker is often part of a toolchain that includes a compiler and/or assembler that generates intermediate files that the linker processes. The linker may be integrated with other toolchain tools such that the user does not interact with the linker directly.

A simpler version that writes its output directly to memory is called the loader, though loading is typically considered a separate process. and may be used directly with the GNU compiler. Another drop-in replacement, mold, is a highly parallelized and faster alternative which is also supported by GNU tools.

See also

  • Binary File Descriptor library (libbfd)
  • Build (computing)
  • Compile and go system
  • DLL hell
  • Direct binding
  • Dynamic binding
  • Dynamic dead-code elimination
  • Dynamic dispatch
  • Dynamic library
  • Dynamic linker
  • Dynamic loading
  • Dynamic-link library
  • External variable
  • Library
  • Loader
  • Name decoration
  • Prelinking (prebinding)
  • Relocation
  • Smart linking
  • Static library
  • Gold (linker)

References

Further reading

  • Code: [https://linker.iecc.com/code.html] Errata: [https://linker.iecc.com/]
  • (19 pages)
  • Ian Lance Taylor's Linkers blog entries
  • Linkers and Loaders, a Linux Journal article by Sandeep Grover
  • Another Listing of Where to Get a Complete Collection of Free Tools for Assembly Language Development
  • GNU linker manual
  • LLD - The LLVM Linker