How can I see 0s and 1s / machine code from an executable / object file?

I already tried this, I opened the a.out file with a text editor, but I only have a bunch of characters with some instructions in it, for example:

UU

+4
source share
4 answers

Try hexdump . Sort of:

 $ hexdump -X a.out 

This will give you exactly that: a hex dump file.

Having said that, another possibility might include using GDB to disassemble the command .

+5
source

Take a look at your local Hex Editor .

+3
source

To see the disassembly (only with bytes of the operation code) of only the code, not including the file headers:

 objdump -d a.aot 
0
source

Executable files come in several formats. For Unix / Linux, this is ELF: http://en.wikipedia.org/wiki/Executable_and_Linkable_Format

For Windows, this is PE: http://en.wikipedia.org/wiki/Portable_Executable

Use objdump tools to see opcodes as others have pointed out,

0
source

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


All Articles