Difficulty: Easy
Correct Answer: Cannot execute anywhere other than the specific memory area fixed at coding or translation time
Explanation:
Introduction / Context:
Loaders, linkers, and operating systems determine where a program resides in memory. Some binaries can be relocated at load time; others are tied to absolute addresses. Understanding the distinction impacts OS design and portability.
Given Data / Assumptions:
Concept / Approach:
A non-relocatable program has absolute address references baked in at assembly/link time, requiring it to load into the exact memory region anticipated by those addresses. Any deviation breaks jumps or data references. Relocatable programs include relocation entries; position-independent code avoids absolute addresses using relative addressing and indirection.
Step-by-Step Solution:
Verification / Alternative check:
Examining the object file shows no relocation records enabling the loader to patch addresses; attempts to relocate result in invalid instruction targets or data access.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing “non-relocatable” with “position-independent”; they are opposites in terms of flexibility at load time.
Final Answer:
Cannot execute anywhere other than the specific memory area fixed at coding or translation time
Discussion & Comments