[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Self-Relocating Program

Definition - What does Self-Relocating Program mean?

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. Self-relocation is used in time-sharing operating systems where the load address of a program may change for each different execution.

Techopedia explains Self-Relocating Program

A self-relocating program alters itself to execute from a different location of the memory. Self-relocation eliminates the need to have several copies of a program on a disk, with each copy having its own different load origin. However, self-relocating programs are not necessary when the computer uses virtual memory.

During the relocation process, the program relocates its sensitive address-sensitive instructions, which allows it to execute from any part of the memory. The requirements for the relocation process are as follows:

  • A table of the address-sensitive instructions. The program must know the translated origin and the execution start address as well as the addresses of the address-sensitive instructions.
  • A relocating logic, which is the code that performs the relocation process.

The two functions are inbuilt into the program; the start address of the relocating code is usually specified as the execution start address of the program. Once the program is loaded into the memory for execution, the relocating logic takes control and performs the relocation using the load address and the information regarding the address-sensitive instructions.

The self-relocation process may be either static or dynamic. Static relocation is performed before the program is executed, whereas dynamic relocation is performed during program execution. Dynamic relocation may first suspend the program execution and perform the relocation, or use a relocation register.

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.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.