当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Implementation of promise all
Convert object to URL
Manipulator motion planning in 3C assembly
LeetCode简单题之三除数
一款拥有漂亮外表的Typecho简洁主题_Scarfskin 源码下载
Samsung, March to the west again
BUFFCTF文件中的秘密1
1216_ MISRA_ C standard learning notes_ Rule requirements for control flow
Cloud computing skills competition -- the first part of openstack private cloud environment
Concours de compétences en informatique en nuage - - première partie de l'environnement cloud privé openstack
nn.Module类的讲解
学fpga(从verilog到hls)
网赚APP资源下载类网站源码
Anti shake and throttling
The following program deletes n consecutive words starting from the ith character from the string str
【Appium】测试时遇到手机内嵌H5页面的切换问题
Data security has become a hidden danger. Let's see how vivo can make "user data" armor again
以下程序实现从字符串str中删除第i个字符开始的连续n个字
浅谈ES6尾调优化
LeetCoed18. 四数之和