Question

So basically I have some ELF binaries compiled on Linux 32 bit.

And I want to analysis it on my Mac 64 bit.

I am trying to use the gnu utils installed by homebrew such as gobjdump and greadelf.

However, when I tried to parser the elf binaries using gobjdump, I got this error:

gobjdump: hello: File format is ambiguous
gobjdump: Matching formats: elf32-i386-nacl elf32-i386-sol2 elf32-i386-vxworks elf32-i386

So my questions are:

  1. is it possible to analysis 32 bit Linux compiled ELF binary on MAC using its gnu utils?

  2. If possible, how to do it ?

Was it helpful?

Solution

Yes, Use the --target=bfdname option to specify the object code format. The option you probably want is elf32-i386.

gobjdump -x --target=elf32-i386 hello

References: man gobjdump

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top