By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,725 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,725 IT Pros & Developers. It's quick & easy.

stages in compilation , linking and loading

P: 6
what are the various stages in generating an object file (.o) from a .c file and then moving on to link the .o 's and libs (.a's) to form an executable?
the first step would be preprocesing. what after that ? when does assembly , compilation come into play ? any links where i could read upon how this entire process from .c to executable works ?
Jul 6 '07 #1
Share this Question
Share on Google+
4 Replies


Meetee
Expert Mod 100+
P: 931
what are the various stages in generating an object file (.o) from a .c file and then moving on to link the .o 's and libs (.a's) to form an executable?
the first step would be preprocesing. what after that ? when does assembly , compilation come into play ? any links where i could read upon how this entire process from .c to executable works ?

Google is the best friend!! :))
Jul 6 '07 #2

P: 6
i actually went through wikipedia before i put up this question. but the idea is still not clear.

it says that compiling has two steps in it. the front end which does the the lexical analysis, synctactic analysis, preprocessing etc.

then you have the back ed which does the code optimization and generation of the machine language.

however, what is not clear is ->

-> after which stage is the .o being created (lets take linux OS as en example)
-> does the assembler come into play ? if yes, at which stage ?
Jul 6 '07 #3

Meetee
Expert Mod 100+
P: 931
i actually went through wikipedia before i put up this question. but the idea is still not clear.

it says that compiling has two steps in it. the front end which does the the lexical analysis, synctactic analysis, preprocessing etc.

then you have the back ed which does the code optimization and generation of the machine language.

however, what is not clear is ->

-> after which stage is the .o being created (lets take linux OS as en example)
-> does the assembler come into play ? if yes, at which stage ?

Check this..

http://cpp.comsci.us/process/build.html

There is a nice explanation given

:)
Jul 6 '07 #4

Meetee
Expert Mod 100+
P: 931
i actually went through wikipedia before i put up this question. but the idea is still not clear.

it says that compiling has two steps in it. the front end which does the the lexical analysis, synctactic analysis, preprocessing etc.

then you have the back ed which does the code optimization and generation of the machine language.

however, what is not clear is ->

-> after which stage is the .o being created (lets take linux OS as en example)
-> does the assembler come into play ? if yes, at which stage ?

This site
will give u an idea about assembler role in execution..!
Jul 6 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.