LoginSignup
2
0

More than 3 years have passed since last update.

objdumpのarchitecture UNKNOWN!への対処

Posted at

エラー内容

あるバイナリファイルを逆アセンブリしようとobjdumpを利用したところエラーが発生した。
エラー出力

$ objdump -d binary_file

binary_file:     ファイル形式 elf32-little

objdump: アーキテクチャ UNKNOWN! 用に逆アセンブルできません

解決法

ググったところ、mオプションでアーキテクチャを指定してあげると想定通りの出力結果が得られる。
以下出力結果(一部抜粋)。

$ objdump -d binary_file -m i386

binary_file:     ファイル形式 elf32-little


セクション .init の逆アセンブル:

00400094 <.init>:
  400094:   06                      push   %es
  400095:   00 1c 3c                add    %bl,(%esp,%edi,1)
  400098:   9c                      pushf  
  400099:   93                      xchg   %eax,%ebx
  40009a:   9c                      pushf  
  40009b:   27                      daa    
  40009c:   21 e0                   and    %esp,%eax

今回はi386を指定したが何を指定すればエラーが解消するかはバイナリファイル次第。
指定可能なアーキテクチャはiオプションで確認できる。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0