将 objdump 用于 ARM 架构:反汇编为 ARM [英] Using objdump for ARM architecture: Disassembling to ARM

查看:34
本文介绍了将 objdump 用于 ARM 架构:反汇编为 ARM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个目标文件,正在尝试反汇编它.当我使用:

I have an object file and am trying to disassemble it. When I use:

objdump -d example.o

我得到一个elf64-x86-64文件格式的程序集.

I get an assembly in code in the file format of elf64-x86-64.

我正在尝试将其反汇编为 ARM,我该怎么做?

I am trying to disassemble this into ARM, how do I go about doing this?

推荐答案

如果你想做ARM代码的反汇编,你最好有一个ARM工具链,这是我得到的:

If you want to do disassemble of ARM code, you'd better have an ARM tool chain, this is what I got:

http://bb.osmocom.org/trac/wiki/toolchain

有了这个之后,就可以使用 arm-elf-objdump 代替 objdump.我使用的命令是

After you have this, you can use arm-elf-objdump instead of objdump. The command I used is

arm-elf-objdump -D -b binary -marm binaryfile.dat

如果您查看联机帮助页,您会发现-b"后面是文件类型.抱歉,我不知道如何告诉 -b 您要分析 .o 文件.-marm"会告诉 CPU 是 ARM.

If you look the manpage, you will find "-b" is followed by the file type. Sorry I don't know how to tell -b you want to analyze a .o file. "-marm" will tell the cpu is ARM.

希望能帮到你.

这篇关于将 objdump 用于 ARM 架构:反汇编为 ARM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆