Relocating bits used by relocating loader are specified bya)Relocating...
Takes an object files and combines them into a single executable file, library file, or another object file.
View all questions of this test
Relocating bits used by relocating loader are specified bya)Relocating...
Relocating bits used by relocating loaders are specified by the linker.
Explanation:
A relocating loader is a program that loads an object program into memory for execution. It is responsible for allocating memory, resolving external references, and performing relocations. Relocations involve adjusting the memory addresses in the object program to match the actual memory locations where the program will be loaded.
When a program is compiled, it may contain references to external symbols, such as functions or variables, that are defined in other modules or libraries. These references are usually represented as symbolic addresses or offsets. However, these addresses are not fixed because the program can be loaded at different memory locations each time it is executed.
To resolve these external references and perform relocations, the relocating loader uses information provided by the linker. The linker is a program that combines multiple object files and libraries into a single executable file. It resolves symbols, calculates addresses, and generates relocation information.
The relocation information specifies the locations in the object program where adjustments need to be made. It contains the addresses or offsets that need to be modified to reflect the actual memory locations. The relocating loader uses this information to update the object program before loading it into memory.
Therefore, it is the linker's responsibility to specify the relocating bits used by the relocating loader. The linker analyzes the object files, resolves symbols, and generates relocation entries based on the memory layout and the addresses of external symbols. These relocation entries are then used by the relocating loader to perform the necessary adjustments during the loading process.
In conclusion, the linker is responsible for specifying the relocating bits used by the relocating loader. It generates relocation information based on the object files and libraries being linked, which is then used by the relocating loader to perform relocations and ensure correct execution of the program.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).