linux - How to view object code as plain binary -


a.out file when viewed in file editor shown unprintable characters. there way view plain binary file. have generated a.out file using gcc. academic purpose.

upon further research, xxd -b should need to. tested in terminal on small a.out file , sure enough printed in binary format.


do mean viewing sequence of 0s , 1s? hexdump(1) should trick, it'll in hexadecimal.

$ hexdump -c /usr/bin/hexdump  0000000    feca    beba    0000    0300    0001    0700    0080    0300 0000010    0000    0010    0000    5080    0000    0c00    0000    0700 0000020    0000    0300    0000    00a0    0000    b06f    0000    0c00 0000030    0000    1200    0000    0a00    0100    0010    0000    107c 0000040    0000    0c00    0000    0000    0000    0000    0000    0000 0000050    0000    0000    0000    0000    0000    0000    0000    0000 

Comments