Search This Blog

Friday, May 25, 2012

Program Library


Program Library


In programming a collection of pre-compiled routines that a program can use is known as a Program Library.
These routines are stored in object format. They are known as library functions or routines. Libraries are especially useful for storing frequently used routines because you do not have to explicitly link them to every program that uses them. The linker automatically looks in libraries for routines that it does not find elsewhere.


Runtime Library


Runtime refers to the event that a program is being executed. The library routines (functions) that are bound to the program during execution are known as runtime library. A linker links the object code of a program to the runtime library in order to produce an executable code of a program.


Linker


Many programming languages allow you to write different pieces of code called modules separately. This
technique simplifies the programming task because you can break a large program into small more manageable tasks; also called divide and conquer. However, finally you need to put all these modules together. This is done by a program known as a linker.

A linker is also called a link editor (binder). So a linker combines all object modules into one executable
program.

A linker also does another job. It replaces the symbolic addresses you use with real addresses. Therefore
even if your program contains one module it has to be linked.

No comments:

Post a Comment