Relocation (computing): Difference between revisions

Content deleted Content added
m mv lk
review: ce for clarity. avoid ambiguous terminology.
Line 10:
A [[linker (computing)|linker]] usually performs relocation in conjunction with ''symbol resolution'', the process of searching files and libraries to replace symbolic references or names of [[library (computer science)|libraries]] with actual usable addresses in [[primary storage|memory]] before running a program.
 
Relocation is typically done by the linker at [[link time]], but it can also be done at [[load time]] by a relocating [[loader (computing)|loader]], or at [[run time (program lifecycle phase)|run time]] by the running program [[self-relocation|itself]].<!--[[User:Kvng/RTH]]-->
 
== Segmentation ==
Line 16:
 
== Relocation table ==
The relocation table is a list of [[pointer (computer programming)|pointer]]saddresses created by the translator (a [[compiler]] or [[Assembler (computer programming)#Assembler|assembler]]) and stored in the object or executable file. Each entry in the table, or "fixup", is a [[pointer (computer programming)|pointer]] toreferences an absolute address in the object code that must be changed when the loader relocates the program so that it will refer to the correct ___location. FixupsEntries in the relocation table are known as ''fixups'' and are designed to support relocation of the program as a complete unit. In some cases, each fixup in the table is itself relative to a base address of zero, so the fixups themselves must be changed as the loader moves through the table.<ref name="Levine_1999_CH1_CH3"/>
 
In some architectures a fixup that crosses certain boundaries (such as a segment boundary) or that is not aligned on a word boundary is illegal and flagged as an error by the linker.<ref name="Borland_2007"/><!--[[User:Kvng/RTH]]-->
 
=== DOS and 16-bit Windows ===