answersLogoWhite

0

In computer science Computer science
Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, relocation is the process of replacing symbolic references or names of libraries Library (computer science)
In computer science, a library is a collection of subroutines or Class used to develop software. Libraries contain code and data that provide services to independent programs....
with actual usable addresses in memory before running a program. It is typically done by the linker Linker
In computer science, a linker or link editor is a computer program that takes one ormore object file generated by a compiler and combines them into a single executable program....
during compilation Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
(at compile time Compile time
In computer science, compile time refers to either the operations performed by a compiler , programming language requirements that must be met by source code for it to be successfully compiled , or properties of the program that can be reasoned about at compile time....
), although it can be done at runtime Runtime
In computer science, runtime or run time describes the operation of a computer program, the duration of its execution, from beginning to termination ....
by a relocating loader Loader (computing)
In computing, a loader is the part of an operating system that is responsible for loading programs from executables into memory, preparing them for execution and then executing them....
. Compilers or assemblers Assembly language
An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
typically generate the executable Executable
In computing, an executable causes a computer "to perform indicated tasks according to encoded instruction ," as opposed to a file that only contains data ....
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:

  1. Each object code has various sections like code Code segment
    In computing, a code segment, also known as a text segment or simply as text, is a phrase used to refer to a portion of memory or of an object file that contains executable Instruction s....
    , data Data segment
    A data segment is one of the sections of a program in an object file or in memory, which contains the global variables that are initialized by the programmer....
    , .bss .bss
    In computer programming, .bss or bss is used by many compilers and linkers as the name of the data segment containing static variables that are filled solely with zero-valued data initially ....
    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.
  2. 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 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 computer storage....
-- 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. 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.
User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Where are your relocation companies in the D.C. area?

There are many different relocation services in the Washington, DC area. Some companies include Prudential Relocation, Beyond the Box Relocation, and Milestone Relocation Solutions.


What part of speech is relocation?

Relocation is a noun.


Enterprise Grade Employee Relocation Services?

Enterprise Grade Employee Relocation Services - HappyLocate " Enterprise Grade Employee Relocation Services - HappyLocate ✓Corporate Relocation Services ✓Employee Relocations with Relocation Policy ✓Relocation Management." "#CorporateRelocationServices #EmployeeRelocations #BusinessMoves #businessmovingcompaniesnearme #corprelocationservices #officepackersandmovers #commercialmovercompany"


What actors and actresses appeared in Relocation Relocation Australia - 2011?

The cast of Relocation Relocation Australia - 2011 includes: Bryce Holdaway as Himself - Presenter Veronica Morgan as Herself - Presenter


The detention centers where Japanese Americans were moved to and confined during World War 2?

Gila River War Relocation Center, ArizonaGranada War Relocation Center, Colorado (AKA "Amache")Heart Mountain War Relocation Center, WyomingJerome War Relocation Center, ArkansasManzanar War Relocation Center, CaliforniaMinidoka War Relocation Center, IdahoPoston War Relocation Center, ArizonaRohwer War Relocation Center, ArkansasTopaz War Relocation Center, UtahTule Lake War Relocation Center, CaliforniaRecommendation: Read the book Farewell to Manzanar to learn what it was like for the Japanese


What is a relocation specialist?

Relocation specialist(could be a real estate agent) is someone who has established a relationship with a relocation company and serves his/her customer needs.


How do you use relocation and allocate both in a sentence?

"The troops 'allocated' the survivors for 'relocation'."


When was Altair Global Relocation created?

Altair Global Relocation was created in 1989.


When was War Relocation Authority created?

War Relocation Authority was created in 1942.


When did War Relocation Authority end?

War Relocation Authority ended in 1946.


Where can you find corporate relocations?

You can find corporate relocation services from companies like Sterling, an international relocation services company. Other companies that also provide relocation services include Allied Pickfords and Corporate Relocation, Inc.


How many Japanese interment camps are there?

10. Gila River War Relocation Center, Arizona Granada War Relocation Center, Colorado (AKA Amache) Heart Mountain War Relocation Center, Wyoming Jerome War Relocation Center, Arkansas Manzanar War Relocation Center, California Minidoka War Relocation Center, Idaho Poston War Relocation Center, Arizona Rohwer War Relocation Center, Arkansas Topaz War Relocation Center, Utah Tule Lake War Relocation Center California