Computer Fundamental
Computer Tutorial

Linker & Loader



Linker & Loader

Linker

Linker is a program that links several object modules and libraries to a single executable program. A source code of a program is often very large consisting of several hundred or more lines. The source code may also include reference to libraries. All these independent modules may not be stored in a single object file. The code is broken down into many independent modules for easy debugging and maintenance. Before execution of the program, these modules and the required libraries are linked together using the linker software. The compiled and the linked program are called the executable code.

Loader

The loader software is used to load and re-locate the executable program in the main memory. Software has to be loaded into the main memory during execution. Loader assigns storage space to the program in the main memory for execution. The working of a Java Runtime Environment (JRE). The java source file Sample.java is compiled and converted into a set of bytecodes and are stored in Sample.class file. At runtime, the class loader loads the bytecodes from the hard disk, checks it, and runs it in an interpreter. The interpreter executes the bytecode and makes calls to the underlying hardware