Relocation (computer science)

In computer science, relocation is the process of replacing symbolic references or names of libraries with actual usable addresses in memory before running a program. It is typically done by the linker during compilation (at compile time), although it can be done at runtime by a relocating loader. Compilers or assemblers typically generate the executable with zero as the lower-most, starting address. Before the execution of object code, these addresses should be adjusted so that they denote the correct runtime addresses.

Relocation is typically done in two steps:
#Each object code has various sections like code, data, .bss etc. To combine all the objects to a single executable, the linker merges all sections of similar type into a single section of that type. The linker then assigns runtime addresses to each section and each symbol. At this point, the code (functions) and data (global variables) will have unique runtime addresses.
#Each section refers to one or more symbols which should be modified so that they point to the correct runtime addresses.

A fixup table -- a relocation table -- can also be provided in the header of the object code file. Each "fixup" is a pointer to an address in the object code that must be changed when the loader relocates the program. Fixups 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. [cite book
title = Linkers and Loaders
author = John R. Levine
chapter = Chapter 3: Object Files
month = October
year = 1999
publisher = Morgan-Kauffman
isbn = 1-55860-496-0
] In some architectures, compilers, and executable models, a fixup that crosses certain boundaries (such as a segment boundary) or that does not lie on a word boundary is illegal and flagged as an error by the linker. [cite web
title = Borland article #15961: Coping with 'Fixup Overflow' messages
url =
accessdate = 2007-01-15

ee also

*Library (computing)
*Object file
*Relocation table
*Static library


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Relocation — may refer to: *Relocation (computer science) *Moving (address) *Population transferee also*Moving (disambiguation) …   Wikipedia

  • Computer security compromised by hardware failure — is a branch of computer security applied to hardware. The objective of computer security includes protection of information and property from theft, corruption, or natural disaster, while allowing the information and property to remain accessible …   Wikipedia

  • Relocation table — The relocation table is a list of pointers created by the linker and linked into the MSDOS .exe file. The relocation table tells the loader where these segments can be found in program image loaded into memory.ExplanationFar pointers (32 bit… …   Wikipedia

  • Thomas Jefferson High School for Science and Technology — Infobox Education in the United States name= Thomas Jefferson High School for Science and Technology imagesize= 100px motto= streetaddress= 6560 Braddock Road city= Alexandria state= Virginia zipcode= 22312 url= district=… …   Wikipedia

  • Birla Institute of Technology & Science, Pilani - Dubai — Infobox University name = Birla Institute of Technology Science, Pilani Dubai Native Name = बिरला प्रौद्योगिकी एवं विज्ञान संस्थान पिलानी दुबई common name = BITS established = 2000 type = Private location = Dubai International Academic City,… …   Wikipedia

  • Library (computing) — This article is about the programming concept. For Windows 7 Libraries, see Features new to Windows 7#Libraries. Illustration of an application which uses libvorbisfile to play an Ogg Vorbis file In computer science, a library is a collection of… …   Wikipedia

  • Moving — or movin may refer to: Moving of goods Moving (address), the process of leaving one dwelling and settling in another Moving company, a type of company that will relocate household or other goods. Relocation services relating to employess and… …   Wikipedia

  • Загрузчик программ — Загрузчик (англ. loader)  в информатике, программа, отвечающая за загрузку исполнимых файлов и запуск соответствующих новых процессов. Обычно является частью операционной системы, но может быть и самостоятельной программой  к… …   Википедия

  • National Technical University of Athens — NTUA redirects here. For the Taiwanese university, see National Taiwan University of Arts National Technical University of Athens Εθνικό Μετσόβιο Πολυτεχνείο Seal of NTUA (Prometheus Carrying Fire) Established December 31, 1836 (OS) …   Wikipedia

  • History of CP/CMS — This lengthy article explores the History of CP/CMS the historical context in which this important IBM time sharing operating system was built. It provides details to support for the main CP/CMS and History of IBM articles, drawing on source… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.