What is Linker?
Software that combines object files and libraries, performs symbol resolution and relocation, and produces an executable or shared library.
Software that combines object files and libraries, performs symbol resolution and relocation, and produces an executable or shared library.
The linker matches each name (symbol) referenced in the object files with a definition somewhere (symbol resolution), lays out every file's code and data to decide final addresses, and rewrites placeholder addresses in instructions with the right values (relocation).
What is the main role of a linker?The linker collects the symbol tables of all object files and finds exactly one definition for each reference.
Which describes the symbol resolution a linker performs?After laying out all files and deciding real addresses, the linker computes the correct address (or PC-relative distance) for each recorded place and writes it into the instruction.
Which describes the relocation a linker performs?Relocation Object file Dynamic linker Symbol resolution Dynamic linking Static library Weak symbol Interrupt Assembler Symbol table