MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A self-relocating program is one which ____
A
cannot be made to execute in any area of storage other than the one designated for it at the time of its coding or translation
B
consists of a program and relevant information for its relocation
C
can itself perform the relocation of its address sensitive portions
D
All the above
Explanation: 

Detailed explanation-1: -A self-relocating program is one that relocates its address-sensitive instructions to other parts of the memory. The program performs its own relocation and does not require a linker.

Detailed explanation-2: -A self-relocating program is a program which relocates its own code and data sections, during run time. The debug information available in such files doesn’t provide details about where the program sections would be relocated to.

Detailed explanation-3: -Self-relocating programs are less efficient compared to reloadable programs. Apart from genuine self-relocating programs, malware programs use the same self-relocation method to propagate through systems and networks to spread their malicious code.

Detailed explanation-4: -A Relocatable program is one that can be read into memory at any address and executed without modification. A Relocatable program form is one which consists of a program and relevant information for its relocation.

Detailed explanation-5: -Relocation : When a program is run it does not know in advance what location it will be loaded at. Therefore, the program cannot simply generate static addresses (e.g. from jump instructions). Instead, they must be made relative to where the program has been loaded.

There is 1 question to complete.