在mac-osx中对g++创建的可执行文件进行拆解
Disassemble the executable created by g++ in mac osx
如何在Mac OSx上查看C++程序的可执行文件(例如a.out)的反汇编版本?
这并不是您所要求的,但g++ -S
从源代码中生成程序集,并且可以预期它比反汇编版本更可读。
如果不能使用-S
重新编译(例如,没有源代码),那么gdb
可以像objdump --disassemble
一样进行反汇编。取决于您安装了什么。
另请参阅:https://superuser.com/questions/206547/how-can-i-install-objdump-on-mac-os-x
查看otool
。即otool -tv a.out
编辑:要添加到Tony的答案中,objdump
还具有C++的名称映射,即
objdump -tC a.out
(IIRC)
我之前给出了关于如何为darwin构建和安装binutils的答案。
相关文章:
- 如何将不同的可执行文件合并到一个窗口框架中进行编码?像浏览器一样
- 如何使 windows 命令提示符在C++可执行文件上显示返回值?
- CMake:如何将库 A 链接到库 B,然后将可执行文件链接到库 A
- 如何使字符串出现在编译的二进制可执行文件的开头?
- 程序在使用 system() 启动另一个可执行文件时停止
- 如何更改使用 CPack 安装的可执行文件的名称?
- 在Linux上使用Clang / OLLVM交叉编译helloworld Windows可执行文件时的问题
- CMake:我们可以为一组不形成可执行文件或库的特定文件指定包含目录吗?
- 如何将图像传入C++可执行文件并将输出图像存储在新目录中?
- 在终端中运行可执行文件与在Mac查找器中打开
- C 可执行文件不从文件夹工作,而是在Mac上从控制台上工作
- 为什么当我键入名称时我的可执行文件不会运行?(Mac OS X Mountain Lion)Mac OS X 10.8.
- Unix可执行文件上的Mac分段错误,文件编译正常
- 无法在 OSX 上运行编译的 C++ 可执行文件,适用于 Debian
- 将Node.js+Socket.io封装到OSX可执行文件中的可靠方法?(或C/C++/Objective-C库作为替代
- Qt应用程序:如何从Mac为Windows(和Mac)创建独立的可执行文件?
- 在mac-osx中对g++创建的可执行文件进行拆解
- 如何使QT在Mac上为Windows生成可执行文件
- Clang C++交叉编译器-从Mac OS X生成Windows可执行文件
- 在 mac 上的 gnu/clang 编译器中定义相对于可执行文件的框架路径