Linker & Loader
Title
Question
hi sir,
In C & CPP - we will be using Compiler
my Question IS:
1) what is the use of Linker
2) In case , if i use Interpreter , to WHOM i should forward Object files ??? [ for Execution ]
C-and-Cpp First-C-Program 01-02 min 0-10 sec
Answers:
This is an advanced question. To understand the answer, you need to understand the hierarchy of languages: HLL, assembly code, machine language, etc. To answer briefly, an object file contains machine code which is "almost" ready to run on a machine. There may be some unresolved variables or functions, such as external variables or library functions. A linker creates an executable which is fully ready to run on a machine.
The above holds for compiled languages. For interpreted languages, the interpreter (another program) reads the program written by the programmer and interprets it at run-time. So there is no notion of object file in an interpreted language.
Login to add comment