What is a Compiler and Linker ?

Compiler is a program that converts another program from some source language (or programming language) to machine language (object code). Some compilers output assembly language, which is then converted to machine language by a separate assembler. 

A compiler is distinguished from an assembler by the fact that each input statement does not, in general, correspond to a single machine instruction or fixed sequence of instructions. A compiler may support such features as automatic allocation of variables, arbitrary arithmetic expressions, control structures such as FOR and WHILE loops, variable scope, input/output operations, higher-order functions and portability of source code. 

Linker is a program that combines one or more files containing object code from separately compiled program modules into a single file containing loadable or executable code This process involves resolving references between the modules and fixing the relocation information used by the operating system kernel when loading the file into memory to run it.

No comments:

Post a comment