我不知道如何使用objdump

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

我不知道如何使用objdump

#1

帖子 寺島聰子 » 2017-11-12 23:59

m@m ~ $ cd '/home/m/Documents/BIOS関連'
m@m ~/Documents/BIOS関連 $ ls
0502.ROM AFU236U.exe e3490_v-p5g31.pdf
0502X.ROM AMIBCP mmtool322.EXE
1003.ROM P5KPL-VM-7-ASUS-V-P5G31-0401.ROM text
m@m ~/Documents/BIOS関連 $ objdump -d 0502.ROM > dump.txt
objdump: 0502.ROM: ファイル形式が認識できません
----------------------------------------------------------------
AMI BIOSに基づくSOTEC BIOSである 0502.ROM。
この*.ROM filesに問題(Core 2 Duo E8400がPOST中にハングアップします)
があるので、逆アセンブルで、0502.ROM をアセンブラ・コードに変換して、
制限を掛けているプログラムを特定したい。
逆アセンブラは、LINUX の objdump で逆アセンブラ出来るみたいだが、以上のエラーが出ました。
コマンドの使い方がわかりません。
0502.ROM which is SOTEC BIOS based on AMI BIOS.
Problem with this *. ROM file (Core 2 Duo E 8400 hangs during POST)
Since it has disassembled, convert 0502.ROM to assembler code,
I would like to identify the program that imposes restrictions.
The disassembler seems to disassemble with objdump of LINUX, but the above error has come out.
I do not know how to use the command.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 我不知道如何使用objdump

#2

帖子 poloshiao » 2017-11-13 7:43

http://manpages.ubuntu.com/manpages/xen ... ump.1.html
objdump - display information from object files.
-M options
-disassembler-options=options
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

Re: 我不知道如何使用objdump

#3

帖子 寺島聰子 » 2017-11-13 10:05

http://memo.wnishida.com/?date=20040429
已显示错误消息“无法识别文件格式”。 这应该是,mov1.bin没有任何可执行代码以外的附加信息。

对于这种情况,objdump有一个-b选项。 这是BFD名称的缩写,是指定文件格式的选项。 由于mov1.bin是二进制模型,请指定二进制。
--------------------------
这次我说“我不了解架构”。 它是一个燃烧的家伙,但-m(机器)作为指定架构的选项提供。
$ objdump -b binary -m i386 -D 0502.ROM > dump.txt
我做到了。
感谢poloshiao様
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 我不知道如何使用objdump

#4

帖子 poloshiao » 2017-11-13 10:12

http://manpages.ubuntu.com/manpages/xen ... ump.1.html
objdump - display information from object files.
-m machine
--architecture=machine
Specify the architecture to use when disassembling object files.
This can be useful when disassembling object files which do not
describe architecture information, such as S-records. You can list
the available architectures with the -i option.

If the target is an ARM architecture then this switch has an
additional effect. It restricts the disassembly to only those
instructions supported by the architecture specified by machine.
If it is necessary to use this switch because the input file does
not contain any architecture information, but it is also desired to
disassemble all the instructions use -marm.
回复