Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

objdump: Can't use supplied machine MIPS

I'm getting following error for the disassembling of the object with below command. Object file was generated for MIPS platform.

$objdump -D -m MIPS myobjfile.o

Error:

objdump: Can't use supplied machine MIPS

The snippet I'm attaching for reference from objdump.c

  const bfd_arch_info_type *inf = bfd_scan_arch (machine);

  if (inf == NULL)
      fatal (_("can't use supplied machine %s"), machine);

Can you please help me to get correct assembly code?

like image 556
Ramesh K Avatar asked Dec 06 '25 10:12

Ramesh K


1 Answers

Way late on this, but this solved my problem which is the same as yours but for ARM64(aarch64).

If you're building from source you can enable all target architectures by passing the --enable-targets=all to ./configure:

git clone git://sourceware.org/git/binutils-gdb.git 
cd binutils-gdb
./configure --enable-targets=all
make

This enables objdump to work with all architectures, including MIPS

This is from @soulseekah post here: Using objdump for ARM architecture: Disassembling to ARM

like image 173
ste11ar Avatar answered Dec 08 '25 00:12

ste11ar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!