Skip to content

Glossary

Relocation

The process of adjusting hardcoded addresses in a binary when it is loaded at a different base address than the one assumed at compile time.

Relocation is the mechanism by which a loader or linker patches absolute addresses embedded in a binary when the binary is mapped to a base address different from the one assumed at link time. In PE Format files the .reloc section lists every location that needs patching; in ELF Format files relocation entries appear in .rela.* sections. Address Space Layout Randomization (ASLR) forces the OS to perform relocations at every load. Stripped binaries may omit relocation data for static executables, but shared libraries always require it. Analysts must account for the load-time delta when setting breakpoints by absolute address.