System Programming

Loader and Linkers

Outline  :
   * Basic Loader Function
   * Machine dependent loader features
   * Machine independent loader features
   * Loader design option

Loading, Linking and Relocation

Loading which brings object program into memory for execution. Linking which combines 2 or more separate object programs and supplies the information needed to allow reference between them. Relocation which modifies the object program so that it can be loaded at an address different form the location originally specified.

Loaders and Linkers :-

A loader is a system program that performs the loading function many loaders also supports location and linking. Some systems have a linkers or Linkage editors to performs the linking operations and separate loader to handle relocation and linking.

Basic Loader Functions.

  * Design of an absolute loader
  * A simple bootstrap loader

Absolute Loader :
Bringing the object program into memory and starting the execution , We have to be specify where it is to be loaded in the memory,it will jump to the location where the object code is located.
Advantage :
-- Simple and Efficient
Disadvantage :
-- Specify the actual address
-- Library subroutines

* There is no linking and relocating is needed. Records in object program has three types of it.

1. Header Record
 Check the header record for program name, starting address and length.
2. Text Record
 Bring the object program contained in the text record to the indicated address.
3. End Record
 Transfer the control to the address specify in the end record.

In the absolute loader it store object codes in binary form. Less page loading time not for reading . The object code representation has been done in 2 forms.
 a. Character Form
 b. Binary Form

Character Form

Each byte of assembled code is given using hexadecimal representation in character form. And easy to read by human beings.

Binary Form

Each byte of object code is stored as the single byte most machines store object program in a binary form.

A simple bootstrap loader

It loads the first program to be run by the computer. e.g. SIC bootstrap loader.

It begins the address 0. it loads the operating system address to be 0X80. No header record or control information is needed . The object code is consecutive bytes of memory after load the operating system the control is transferred to the instruction at the address 80.
 

Rest of the part in next day...


































1 comment:

  1. kya hya SYstem software me space collide kar gaya kya?

    ReplyDelete