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:
1) Identify absolute references emitted by the linker.2) Recognize loader constraints: must map the program to the predetermined base.3) If loaded elsewhere, address calculations fail, causing crashes.4) Therefore classify as non-relocatable: fixed-location only.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