3.3
3.3
intermediate software build files such as object and library files into a
single executable file such 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.[1][2]
Overview
[edit]
Dynamic linking
[edit]
Static linking
[edit]
Static linking is the result of the linker copying all library routines used
in the program into the executable image. This may require more disk
space and memory than dynamic linking, but is more portable, since it
does not require the presence of the library on the system where it
runs. Static linking also prevents "DLL hell", since each program
includes exactly the versions of library routines that it requires, with no
conflict with other programs. A program using just a few routines from
a library does not require the entire library to be installed.
Relocation
[edit]