Jump to content

Relocation table

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Frencheigh (talk | contribs) at 05:08, 18 January 2005 (overlinking, dabs). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Far pointers (32-bit pointers with segment:offset, used to address 24-bit 640 KB memory space available to MSDOS programs), which point to code or data within an MSDOS executable (EXE) do not have absolute segments, because the actual address of code/data depends on where the program is loaded in memory and this is not known until the program is loaded. Instead, segments are relative values in the MSDOS *.EXE file. These segments need to be corrected, when the executable has been loaded into memory.

The EXE loader uses a relocation table to find the segments which need to be adjusted. The relocation table tells the loader where these segments can be found in program image loaded into memory. The relocation table is a list of pointers created by the linker and linked into the MSDOS .exe file.