recategorized by
1,803 views

1 Answer

Best answer
2 votes
2 votes

Answer D Relocation

Relocation is the process of replacing symbolic references or names of libraries with actual usable addresses in memory before running a program.

  • It is typically done by the linker during compilation (at compile time)
  • It can be done at runtime by a relocating loader.
  • Compilers or assemblers typically generate the executable with zero as the lower-most starting address. Before the execution of object code, these addresses should be adjusted so that they denote the correct runtime addresses.

Relocation is typically done in two steps:
1. Each object code has various sections like code, data, etc. To combine all the objects to a single executable, the linker merges all sections of similar type into a single section of that type. The linker then assigns runtime addresses to each section and each symbol. At this point, the code (functions) and data (global variables) will have unique runtime addresses.
2. Each section refers to one or more symbols which should be modified so that they point to the correct runtime addresses.

selected by
Answer:

Related questions

1 votes
1 votes
1 answer
2
go_editor asked Jul 26, 2016
2,868 views
Linux operating system usesAffinity schedulingFair Preemptive SchedulingHand ShakingHighest Penalty Ratio Next