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.
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.
The compiler builds each file as if it started at address 0 and records, as relocation entries, every place that uses the address of another file's function or of its own variables.
Which describes the relocation a linker performs?An object file holds the machine code translated from that file's functions, initial values of variables, a list of names it defines and references (the symbol table) and a list of places whose addresses must be filled in later (relocation entries).
Which statement is correct about the object file (.o) a com…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?Linker Dynamic linking Dynamic linker Object file Symbol table Symbol resolution Procedure linkage table (PLT) Address space layout randomization (ASLR) BSS section Entry point