Can gnu utils on a Mac, for example gobjdump parser Linux ELF?

So basically I have some ELF files compiled on a 32-bit version of Linux.

And I want to analyze it on my Mac 64-bit.

I am trying to use gnu utils installed by homebrew, such as gobjdumpand greadelf.

However, when I tried to parse 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:

  • Is it possible to parse 32-bit Linux compiled ELF binary code on a MAC using its gnu utils?

  • If possible, how to do it?

+4
source share
1 answer

, --target=bfdname, . , elf32-i386.

gobjdump -x --target=elf32-i386 hello

: man gobjdump

+6

Source: https://habr.com/ru/post/1537396/


All Articles