2012年5月19日
摘要: 最近学习链接器的链接和装载过程。首先说说一个程序从源代码到可执行文件的流程(以linux平台上c程序为例):第一步预编译过程的命令如下:gcc -E test.c -o test.i 或 cpp test.c > test.i由.c文件生成.i预处理文件第二步:gcc -S test.i -o test.s由.i生成.s汇编文件第三步:as test.s -o test.o 或gcc -c test.s -o test.o生成目标文件第四步:ld -static /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc/i686-linux-gnu/4.6 阅读全文
posted @ 2012-05-19 16:33 渊蓝之蓝 阅读(695) 评论(0) 推荐(0) 编辑