Self-relocation - Wikipedia, the free encyclopedia [Link]
org/wiki/Self-relocation
From Wikipedia, the free encyclopedia
Self-relocation is a process, which an executing computer program may use to effect a change in the base
address at which that computer program executes. This is similar to the relocation process employed by the
loader when a program is copied from external storage into main memory; the difference is the locus of
instructions that compute the relocation. When those instructions reside within the relocated program,
self-relocation occurs.
When computer programs execute upon a computer, their instructions are at the same time stored within the
main memory of a computer. As it is necessary for the processor of the computer to retrieve these
instructions in a timely and orderly fashion, it is necessary that these instructions be stored in series,
beginning at a particular memory location, which is known by its address. In general, it is the case that the
instructions of a program are stored in memory at fixed addresses. The instructions of the program do not
move as the processor retrieves and executes them, in timely and orderly fashion.
Yet, it is possible to construct a computer program so that it does not stay at a fixed address in memory, even
as it executes. This process is called self-relocation. As an extreme example, the Apple Worm is a dynamic
self-relocator.
Self-relocation occurs when a program copies, in order, the code of its instructions from one sequence of
locations to another sequence of locations within then main memory of a single computer, and then transfers
processor control from the instructions found at the source locations of memory, to the instructions found at
the destination locations of memory. As such, the data operated upon by the algorithm of the program is the
sequence of octets (bytes) which define the program.
Dewdney, AK, Computer Recreations. Scientific American (March 1985).
Relocation
Retrieved from "[Link]
Categories: Computer stubs
This page was last modified on 25 September 2010 at 10:33.
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may
apply. See Terms of Use for details.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
1 of 1 1/6/2011 12:29 AM