A linker (computing) is a program that combines compiled or assembled components and connects references to their definitions. It reads object files and libraries, resolves named symbols, and applies relocation (computing) when locations become known. A typical output is an executable program or a shared software library.[ref]
Overview in the GNU ld documentation. §1 Overview: object/archive inputs, relocation and symbol references
Suppose one source file calls
square and another defines it. Their object files can be produced separately; the linker (computing) matches the call's unresolved symbol to the definition and arranges the final reference. A missing definition can therefore cause a link-time failure even when each source file compiled successfully. Some references can instead be resolved when a shared software library is loaded.