objdump - GNU的二进制工具
Posted mapleay
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了objdump - GNU的二进制工具相关的知识,希望对你有一定的参考价值。
objdump,可以用来将编译后的目标文件反汇编成汇编代码,对于研究学习编程语言(C/C++)有用。
objdump is a command-line program for displaying various information about object files on Unix-like operating systems. For instance, it can be used as a disassembler to view an executable in assembly form. It is part of the GNU Binutils for fine-grained control over executables and other binary data. objdump uses the BFD library to read the contents of object files. Similar utilities are Borland TDUMP, Microsoft DUMPBIN and readelf.
Note that on certain platforms (e.g. Mac OS X), the objdump binary may actually be a link to llvm‘s objdump, with different command-line options and behavior.
objdump [ -a | --archive-headers ] [ -b bfdname | --target=bfdname ] [ -d | --disassemble ] [ -D | --disassemble-all ] [ -f | --file-headers ] [ -h | --section-headers | --headers ] [ -i | --info ] [ -j section | --section=section ] [ -l | --line-numbers ] [ -m machine | --architecture=machine ] [ -r | --reloc ] [ -R | --dynamic-reloc ] [ -s | --full-contents ] [ --stabs ] [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ] [ --version ] [ --help ] objfile...
举例:
查看汇编文本内容,这是intel的,也可以反汇编出针对 ARM MCU(Cortex-A8)的汇编指令:
以上是关于objdump - GNU的二进制工具的主要内容,如果未能解决你的问题,请参考以下文章