08-03-2012, 02:25 PM
Binding & Dynamic Linking
Binding & Dynamic Linking.ppt (Size: 2.18 MB / Downloads: 39)
Address Binding
Definition
Converting the (relative or symbolic) address used in a program to an actual physical (absolute) address
Address binding time
During compilation
But, often don’t know where program will be loaded when it is compiled (or assembled)
During load time
In order for a program to be initially loaded, decisions must be made about where it will execute in computer memory, so at least initial specific addresses must be bound
During execution
We may want to move a program, during execution, from one region of memory to another
Linking
Linking : Copying together a main program with the routines it uses, update the symbol table .
Final stage of Compilation.
Different Type of Libraries
Libraries –
Collection of sub-programs
Images of library function is copied into executable file
Two types of libraries:
Static Libraries
Shared Libraries
Static Linking
Performed before program execution.
Carried out only once to produce an executable file.
If static libraries are called, the linker will copy all the modules referenced by the program to the executable.