100% found this document useful (1 vote)
620 views

Unit 3 PPT Linker and Loader

The document discusses different types of loaders and linkers. It describes compile and go loaders, general loaders, absolute loaders, direct linking loaders, and relocating loaders. A loader is a program that places other programs into memory and prepares them for execution. Key functions of loaders include allocation, linking, relocation, and loading of programs. Compile and go loaders directly place assembled machine code into memory locations, while general loaders separate assembly and loading. Direct linking loaders use symbol dictionaries and other cards to link and relocate program segments.

Uploaded by

Shraddha Sangole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
620 views

Unit 3 PPT Linker and Loader

The document discusses different types of loaders and linkers. It describes compile and go loaders, general loaders, absolute loaders, direct linking loaders, and relocating loaders. A loader is a program that places other programs into memory and prepares them for execution. Key functions of loaders include allocation, linking, relocation, and loading of programs. Compile and go loaders directly place assembled machine code into memory locations, while general loaders separate assembly and loading. Direct linking loaders use symbol dictionaries and other cards to link and relocate program segments.

Uploaded by

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

Unit 3 : Loaders & Linkers

Syllabus:
 Loaders: Loader Schemes
 Compile and Go
 General Loader Scheme
 Absolute Loader Scheme, Subroutine Linkages
 Relocation and linking concepts
 Self-relocating programs, Relocating Loaders,
Direct Linking Loaders, Overlay Structure.
Loaders
 A program that places programs into memory and prepares
them for execution

Functions of Loader:
 Allocation
 Linking
 Relocation
 Loading
Loaders Scheme or types of Loader

 Compile and go loader or Assemble and go loader


 General loader scheme
 Absolute loader
 Direct linking loader
 Relocating loader
 Dynamic linking loader
Compile and go loader or Assemble and go
loader
 The instruction is read line by line, its machine code is
obtained and it is directly put in the main memory at some
known address.
 Assembler runs in one part of memory and the assembled
machine instructions and data is directly put into their
assigned memory locations.
 After completion of assembly process, it assigns starting
address of the program to the location counter.
 Advantages
• Easy to implement

Disadvantages
 Portion of memory is wasted
 There is no production of .obj file
 It cannot handle multiple source programs or multiple
programs written in different languages
 The execution time will be more in this scheme as every
time program is assembled and then executed
 Advantages:
 The program need not be retranslated each time while running it
 There is no wastage of memory, because assembler is not placed in
the memory
 It is possible to write source program with multiple programs and
multiple languages
i. Allocation is done by either programmer or assembler

ii. Linking is done by the programmer or assembler

iii. Resolution is done by assembler

iv. Simply loading is done by the loader


Direct Linking Loader
 The loader cannot have the direct access to the source code.
The assembler should give the following information to the loader
 The length of the object code segment
 The list of all the symbols which are not defined in the current
segment but can be used in the current segment.
 The list of all the symbols which are defined in the current segment
but can be referred by the other segments.
 4 types of cards available in the direct linking
loader.
They are
 ESD-External symbol dictionary
 TXT-card
 RLD-Relocation and linking dictionary
 END-card

You might also like