如何拆卸在Linux下二进制可执行文件来获得大会code? [英] How to disassemble a binary executable in Linux to get the assembly code?
本文介绍了如何拆卸在Linux下二进制可执行文件来获得大会code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我被告知使用反汇编。是否 GCC
的东西建在?什么是做到这一点的最简单的方法?
I was told to use a disassembler. Does gcc
have anything built in? What is the easiest way to do this?
推荐答案
我不认为 GCC
都是有标志,因为它主要是一个编译器,但另一的GNU开发工具一样。 objdump的
需要 -d
/ - 拆卸
标志:
I don't think gcc
has a flag for it, since it's primarily a compiler, but another of the GNU development tools does. objdump
takes a -d
/--disassemble
flag:
$ objdump -d /path/to/binary
反汇编如下:
080483b4 <main>:
80483b4: 8d 4c 24 04 lea 0x4(%esp),%ecx
80483b8: 83 e4 f0 and $0xfffffff0,%esp
80483bb: ff 71 fc pushl -0x4(%ecx)
80483be: 55 push %ebp
80483bf: 89 e5 mov %esp,%ebp
80483c1: 51 push %ecx
80483c2: b8 00 00 00 00 mov $0x0,%eax
80483c7: 59 pop %ecx
80483c8: 5d pop %ebp
80483c9: 8d 61 fc lea -0x4(%ecx),%esp
80483cc: c3 ret
80483cd: 90 nop
80483ce: 90 nop
80483cf: 90 nop
这篇关于如何拆卸在Linux下二进制可执行文件来获得大会code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文