0
23kviews
Explain Working Of A Direct Linking Loader With A Proper Example. Clearly Show The Entries In Different Databases Built By The Direct Linking Loader.

• Loader is the system program which is responsible for preparing the object program for execution and initiate the execution.

• The loader does the job of coordinating with the OS to get initial loading address for the .EXE file and load it into the memory.

Function of Loader

Allocation:

• Allocates the space in the memory where the object program would be loaded for Execution.

Linking:

• It links two or more object codes and provides the information needed to allow references between them.

Loading:

• It brings the object program into the memory for execution.

enter image description here

Dynamic Linking Loader:

• Dynamic Linking Loader is a general re-locatable loader

• Allowing the programmer multiple procedure segments and multiple data segments and giving programmer complete freedom in referencing data or instruction contained in other segments.

• The assembler must give the loader the following information with each procedure or data segment.

• Dynamic linking defers much of the linking process until a program starts running. It provides a variety of benefits that are hard to get otherwise.

• Dynamically linked shared libraries are easier to create than static linked shared libraries.

• Dynamically linked shared libraries are easier to update than static linked shared libraries.

• The semantics of dynamically linked shared libraries can be much closer to those of unshared libraries.

• Dynamic linking permits a program to load and unload routines at runtime, a facility that can otherwise be very difficult to provide.

enter image description here

Length of segment

  1. A list of all symbols in the segment that may be referenced by other segments.
  2. List of all symbols not defined in the segment but referenced in the segment.
  3. Information where the address constant are loaded in the segment.

Format of Databases:

The assembler provides following types of record in the object file as follows

  1. External Symbol Dictionary (ESD)

• ESD record combine information about all the symbol that are defined in this program.

• But may be referenced in the program but defined elsewhere.

  1. Text Cards (TXT)

• Text card record control the actual object code translated version of the source program.

  1. Relocation and Linkage Directory (RLD):

• The RLD records contains information about location in the program

• Whose contents depend on the address at which the program is placed.

  1. END CARD:

• The END card records indicates the end of the object File and specifies the start address for Execution.

enter image description here

ESD

IT consist of three types of definition

• SD- Segment Definition

• LD – Local Definition

• ER – External Reference

enter image description here

Relocating and Linking directory (RLD)

It includes different operations performed on it.

Flag is important in this table

enter image description here

Note:

• Since all the address cannot be resolved in the starting.

• We required two pass Dynamic linking Loader.

• In pass 1 , it performs defining of a segment and local definition

• In pass 2, we work on with the text and RLD.

END

• Specifies the END of the program. • And total address is generated by PLA + SLength.

Please log in to add an answer.

Continue reading...

The best way to discover useful content is by searching it.

Search