What is Relocation?

Rewriting placeholder addresses in instructions and data with correct values once final addresses are decided. The linker does it, and with dynamic linking part of it is done at run time by the dynamic linker.

Field: Linkers, Loaders & Executables

Relocation in the explanations

Questions that mention Relocation (5)

  1. Which describes the relocation a linker performs?
  2. Which statement is correct about the object file (.o) a compiler produces from one source file?
  3. What is the main role of a linker?
  4. In C, what does writing "extern int count;" mean?
  5. Disassembling an object file shows that an instruction calling the external function printf has a placeholder target such as 0. When is the correct value filled in?

Related terms

Linker Dynamic linking Dynamic linker Object file Symbol table Symbol resolution Procedure linkage table (PLT) Address space layout randomization (ASLR) BSS section Entry point

Back to the glossary