Wednesday, August 27, 2014

UNIT III - LOADERS AND LINKERS

1. Write the two passes of a linking loader
Pass1: assigns address to all external symbols 
Pass2: it performs actual loading, relocation and linking. 

2. Define automatic library search.
 In many linking loaders the subroutines called by the program being loaded are automatically fetched from the library, linked with the main program and loaded. This feature is referred to as automatic library search.

3. List the loader options INCLUDE &DELETE
The general format of INCLUDE is INCLUDE program_name (library name) 
This command directs the loader to read the designated object program from a library and treat it as the primary loader input.
 The general format of DELETE command is DELETE Csect-name 
It instructs the loader to delete the named control sections from the sets of programs loaded. 

4. Give the functions of the linking loader.
 The linking loader performs the process of linking and relocation. It includes the operation of automatic library search and the linked programs are directly loaded into the memory.

 5. Define dynamic linking
If the subroutine is loaded and linked to the program during its first call (run time), then it is called as dynamic loading or dynamic linking. 


6. Write the advantage of dynamic linking.
 It has the ability to load the routine only when they are needed.
 The dynamic linking avoids the loading of entire library for each execution.

7. What is meant by static executable and dynamic executable? 
In static executable, all external symbols are bound and ready to run. In dynamic executables some symbols are bound at run time.

 8. What is shared and private data? The data divided among processing element is called shared data. If the data is not shared among processing elements then it is called private data.

9. Write the absolute loader algorithm
 Begin
 Read Header record 
Verify program name and length
 Read first text record 
While record type != „E‟ 
do
Begin 
Move object code to specified location in memory 
Read next object program record 
End 
Jump to address specified in End record
 End

No comments:

Post a Comment