0% found this document useful (0 votes)
76 views7 pages

Topic: Linking and Locating Software: 1. Linker

The document discusses linking, loading, and locating software. It explains that a linker links compiled code, object codes, and OS kernel functions into a binary file. A loader then loads the executable file into RAM by finding available memory addresses. For embedded systems without RAM, a locator is used instead of a loader to permanently place the codes into addresses in ROM during the design process. The locator outputs an Intel hex or Motorola S-record file containing the placed codes. Memory maps must be defined for the locator to allocate codes and data to addresses in RAM and ROM.

Uploaded by

Soundarya Svs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views7 pages

Topic: Linking and Locating Software: 1. Linker

The document discusses linking, loading, and locating software. It explains that a linker links compiled code, object codes, and OS kernel functions into a binary file. A loader then loads the executable file into RAM by finding available memory addresses. For embedded systems without RAM, a locator is used instead of a loader to permanently place the codes into addresses in ROM during the design process. The locator outputs an Intel hex or Motorola S-record file containing the placed codes. Memory maps must be defined for the locator to allocate codes and data to addresses in RAM and ROM.

Uploaded by

Soundarya Svs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

TOPIC: LINKING AND LOCATING SOFTWARE

1. Linker:

Links the compiled codes of application software, object codes from library and

OS Kernel functions.
Linking necessitates because of the number of codes to be linked for the final
binary file.

Linking Necessity:

For example, standard codes for to program a delay task, must link with the

assembled codes.
The delay code sequential from a beginning address.
The assembly software codes also sequential from a beginning address.
Both the codes have to at the distinct address as well as at the available address
in the system.

Linked binary file:

After linking, re-allocation of the sequences of placing the codes before actually

placement of the codes in the memory.


Linked file in binary for run on a computer known as executable file or simply
.exe file.

2. Loader:

Program loaded in a computer RAM.


Loader program performs the task of reallocating the codes after finding the
physical memory address available at a given instant.
Loader a part of the operating system and places codes into the memory after
reading the .exe file.
Step necessary because the available memory address may not start from 0x0000,
and binary codes have to be loaded at the different addresses during the run.
Loader finds the appropriate start address.
In a computer, after the loader loads into a section of RAM and after loading the
program ready to run.

3. Locator:

When the code embeds into ROM or flash, a system design process is locating
these codes as a ROM image.
Codes are permanently placed at the actually available addresses in the ROM.
Embedded systems-no separate program to keep track of the available address at
different times during the running, as in a computer.

Various software tools and chain of actions of linker at host and locator in an embedded
system

Next step after linking-use of a locator for the program codes and data in a place
of a loader.
The locator is specified by the programmer as per available addresses at the
RAM and ROM in Target.
Programmer defines the available addresses in embedded systems for loading to
load and creating files for permanently locating the codes using a device
programmer.
Uses cross-assembler output, a memory allocation map and provides the locator
program output file.
Locator program output is in the Intel hex file or Motorola S-record format.
Uses the cross compile codes in different cross-compiled segments for (i)
instructions, (ii) intitialized values and addresses (iii) constant strings (iv)
uninitialized data.
Locates the I/O tasks and hardware device driver codes at the unchanged
addresses. These are as per the interfacing circuit between the system buses and
ports or devices.

4. Locator Output in Intel hex file or Motorola S-record format

Locator output

Locator output in Intel hex file

Locator Output in Motorola S-record format

5. Memory Map for coding a locator program


Memory map in Princeton Architecture

Memory map in Harvard Architecture

IO port, memory and devices address spaces

Device address in 80x86 host system

A smart card system memory allocation map for the locator program

An automatic chocolate vending machine memory allocation for the locator


program

A digital camera system memory allocation map for the locator program

A robust system memory allocation map for the Locator programs

You might also like