3

I want to disassemble i386 machine instructions into human readable text in Raspbian.

I am a rookie Linux user and don't know the configuration of installed tools, but from what I understand I need an architecture for i386 for objdump.

objdump -D -b binary -mi386 -Maddr16,data16 binfile

    binfile: file format binary

    objdump: can't use supplied machine i386

Indeed, looking at the supported architectures in objdump, I can see i386 is not included.

objdump: supported architectures: arm armv2 armv2a armv3 armv3m armv4 
         armv4t armv5 armv5t armv5te xscale ep9312 iwmmxt iwmmxt2 plugin

How can I add i386 architecture to the list of supported architectures? Is it a pluggable definition I can just download and place in a particular location? Or do I need to modify and make a new objdump executable?

Statement
  • 203
  • 1
  • 10

1 Answers1

4

I have not tried it, but there is a binutils-multiarch package "used to manipulate binary and object files that may have been created on other architectures". It includes an objdump which from the looks of things will replace the existing one. The other files are listed here.

So, worth trying:

apt-get install binutils-multiarch

And seeing if the new objdump meets your needs.

goldilocks
  • 60,325
  • 17
  • 117
  • 234