492 views
0 votes
0 votes
I have just one confusion that when we talk about compile time  binding then all the symbols are resolved at compile time so does it necessarily imply that the code will also be allocated memory at that time only , since absolute address is known at that time ?

1 Answer

0 votes
0 votes
any binding actually means when the code is binded with the actual address. if it is compile time then the actual address will be available at compile time. if it is run time the address will be available at run time. and if link time then it means the code be binded at link time. and we know linker is used at link time this means the linker will be converting your relocatable address to absolute address. in run time loader will be doing it, and compile time compiler do it . refrence :http://www.isical.ac.in/~mandar/os/memory.pdf

Compile-time binding
Location of program in physical memory must be known at
compile time
Compiler generates absolute code
compiler binds names to actual physical addresses
Loading  copying executable file to appropriate location in
memory
If starting location changes, program will have to be recompiled
Example: .COM programs in MS-DOS

Related questions