Ratnesh Chouhan wrote:
> Hi Frds,
>    
>   Can anybody describe in detail how a c\c++ program is converted to exe.
>   hw the function calls are resolved and how this exe is loaded in memory and 
> then how it is made to run.
>    
>   Thanks and Regards,
>   Ratnesh Chouhan

Entire books have been written on this subject.  You have hit an 
extremely advanced topic known as "compiler design".  Search Google and 
look at Amazon.com.

How the application runs is up to the OS.  Windows uses the PE file 
format, which contains an entry point in the extended header (the PE 
part) which is the address where code starts executing.  A whole lot of 
stuff goes on behind the scenes to initialize the C/C++ RTL and prepare 
to call main() before main() is actually called.  Then there is a lot of 
cleanup work that goes on to properly shut everything down before 
exiting after leaving main().

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* VerifyMyPC 2.5
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.

http://www.CubicleSoft.com/VerifyMyPC/

Reply via email to