当前位置:网站首页>clang 如何产生汇编文件
clang 如何产生汇编文件
2022-04-23 07:04:00 【zhonguncle】
有时候为了学习或者调试,需要查看程序的汇编代码。这在很多 GUI 的 IDE 中很方便实现,例如在 Xcode 中,点击“Product”-“Perform Action”-“Assemble 文件名”就可以,如下:
那么在终端中呢?
首先写一个 C 源码文件 test.c。内容如下:
#include <stdio.h>
int main() {
printf("hello world!\n");
return 0;
}
然后使用以下命令:
$ cc -S test.c
这时候会产生一个名为test.s的文件,里面就是汇编语言,如下:
希望能帮到有需要的人~
版权声明
本文为[zhonguncle]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_33919450/article/details/124358476
边栏推荐
- 剑指offer day24 数学(中等)
- 浅谈ES6尾调优化
- mysql查询字符串类型的字段使用数字类型查询时问题
- C language learning record -- use and analysis of string function (2)
- 利用Js实现一个千分位
- dried food! Point based: differentiable Poisson solver
- 简述CPU
- LeetCode15. 三数之和
- 1216_MISRA_C规范学习笔记_控制流的规则要求
- Talking about distributed storage from ES, mongodb, redis and rocketmq
猜你喜欢
随机推荐
浅谈ES6尾调优化
怎么读书读论文
Planification du mouvement du manipulateur dans l'assemblage 3c
输入 “ net start mysql ”,出现 “ 发生系统错误 5。 拒绝访问 ” 。问题详解
編譯原理題-帶答案
Penetration test interview collection -- HVV---
idea:使用easyYapi插件导出yapi接口
AAAI 2022 recruit speakers!!
vivo,硬件安全的爱与雷霆
Concours de compétences en informatique en nuage - - première partie de l'environnement cloud privé openstack
CSV Column Extract列提取
How to import Excel data in SQL server, 2019 Edition
MySQL——第一章节(MySQL中的数据类型)
Principle of sentinel integrating Nacos to update data dynamically
GUI,CLI与Unix哲学
Compiler des questions de principe - avec des réponses
Feign source code analysis
Mobile web (Font Icon, plane conversion, color gradient)
Ubuntu安装Mysql并查询平均成绩
1216_ MISRA_ C standard learning notes_ Rule requirements for control flow