Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What exactly is relocatable code? How is it implemented?

code implemented relocatable
0
10 Posted

What exactly is relocatable code? How is it implemented?

0

Relocatable code means code that can sit anywhere in main memory. The main memory address is not hard-coded into the program when it is compiled and resides on the disk. The program uses only relative addresses, for example, with reference to the beginning of the program. When you ask for the program to be run, a part of the OS (called the dispatcher or loader) decides where in main memory the process will run now, and the relative addresses get interpreted accordingly. The details of this process vary according to the OS and the memory management scheme. Some of this will be clear when we study processes under Unix.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.