当前位置:网站首页>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
边栏推荐
- Go语学习笔记 - 数组 | 从零开始Go语言
- Penetration test interview collection -- HVV---
- Guoji Beisheng openstack container cloud environment construction
- Solidity IDE Remix中文版使用手册
- Hump naming object
- [go] common concurrency model [generic version]
- Cloud computing skills competition -- Part 2 of openstack private cloud environment
- Samsung, March to the west again
- Anti shake and throttling
- 编译原理题-带答案
猜你喜欢
随机推荐
Intranet penetration series: icmptunnel of Intranet tunnel (Master James Barlow's)
每周leetcode - 06 数组专题 7~739~50~offer 62~26~189~9
Smart business card applet business card details page function implementation key code
PHP generates short links: convert numbers to letters and letters to numbers
CSV Column Extract列提取
LeetCode简单题之计算字符串的数字和
简述CPU
Comparison of indoor positioning methods of several intelligent robots
Solidity IDE Remix中文版使用手册
LeetCoed18. 四数之和
【Appium】测试时遇到手机内嵌H5页面的切换问题
网赚APP资源下载类网站源码
LeetCode简单题之三除数
使用 Ingress 实现金丝雀发布
BUUCTF [极客大挑战 2019]EasySQL1
搜一下导航完整程序源码
剑指offer day24 数学(中等)
渗透测试面试合集---HVV---
LeetCode 1611. 使整数变为 0 的最少操作次数
Implementation of promise all









