Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how c compiler works,

Status
Not open for further replies.

smartshashi

Member level 4
Member level 4
Joined
Aug 11, 2004
Messages
68
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
513
how c compiler works?

how c compiler works,what is its o[/color]utput?
why object file is called relocatable object file?
what are linkers.

please also send me some links having this information

If anyone knows please help me out
 

well my friend, I think if you do some googling you will find tons of answers to your question, however, here is my two cents on this.
C compiler reads your C code, which is a high-level language that we can easily understand and converts it to the machine language. That is said, you should have a C compiler for Intel cpu different than that for the _old_ MAC cpu.
While doing that, the compiler goes into different intermediate steps if you (as a user) want it. It can generate the .o files (the object files) if you ask it to do so, or it can generate the executable file directly.
There are couple of phases in the compilation process. The compiler first invokes a preprocessor to replace its directives (such as the #define statements, or #include statements) with the real stuff. It then calls the lexical analyser to make sure you don't have errors in your syntax, and then it generates the object files that you can use with different programs and then it calls the linker to link all the object files in order to generate the last and final executable file.
There are some other intermediate phase that you force by some switches.
Hope this help...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top