gcc test.c -o test
上述动作包含四个阶段:预处理(预编译 Preprocessing)、编译(Compilation)、汇编(Assembly)和链接(Linking)
预处理:gcc -E test.c -o test.i
编译为汇编代码:gcc -S test.i -o test.s
汇编:gcc -c test.s -o test.o (gas汇编器)
链接:gcc test.o -o test
./test
文章转摘地址:http://www.cnblogs.com/ggjucheng/archive/2011/12/14/2287738.html