读书人

gcc,g++编绎进程

发布时间: 2012-09-20 09:36:50 作者: rapoo

gcc,g++编绎过程

1.The Preprocessor
? expand macros and included header files. ?

?

cpp hello.c >> hello.i

??
?

2.The Compiler
? preprocessed source code to assembly language,for a specific processor ?

?

gcc -Wall -S hello.i
?


3.The assembler
? convert assembly language into machine code and generate an object file

?

as hello.s -0 hello.o
?

?

4.Linker
? linking of object files to create an executeable,in practice,an executeable requires many external functions from system and c run-time(crt) libraries.

?

gcc hello.o
?

?

?

读书人网 >编程

热点推荐