当前位置:网站首页>GCC编译过程
GCC编译过程
2022-08-09 14:59:00 【why_so_hot】
预处理:gcc -E hello.c -o hello.i
编 译:gcc -S hello.i -o hello.s
汇 编:gcc -c hello.s -o hello.o
链 接:gcc hello.o -o hello_elf
-E:只进行预处理
-S:只进行预处理和编译
-c:只进行预处理、编译和汇编
-o filename:指定生成的输出文件名为filename
预处理:删掉注释(因为不需要执行),将include的头文件的内容展开,放在可执行的cpp文件开头(相当于头文件里面的函数声明,变量定义等都放在了开头),同时替换define的变量
编译:将代码转换成汇编,这一步检查语法
汇编:将汇编代码转换成01的二进制文件
链接:把相应的系统动态库等链接起来,生成可执行文件
边栏推荐
猜你喜欢
随机推荐
流体拓扑优化问题
Excel绘制统计图
R-CNN Fast R-CNN Faster R-CNN总结
【力扣】96. 不同的二叉搜索树
Grey prediction and MATLAB, the application of MATLAB in mathematical modeling
机器学习的基本术语
杭州富阳科目三新规3号线考试攻略
#define DEBUG(format, ...) 以及 #、##、__VA_ARGS__和##__VA_ARGS__的作用
NLP-Reading Comprehension Task Learning Summary Overview
hugging face tutorial - Chinese translation - model summary
Hold face (hugging face) tutorial - Chinese translation - create a custom framework
hugging face tutorial-Chinese translation-pipeline-based reasoning
DOS命令
【力扣】128. 最长连续序列
交叉编译 Crypto++
蓝桥杯嵌入式备赛
【Postgraduate Work Weekly】(Week 8)
配置 vscode 让它变得更好用
Markdown 文档生成 PDF
交叉编译 OpenSSL