I want to display the hexadecimal
format of a compiled binary from an helloworld.c
program using vim.
The source code of the helloworld.c
:
#include < stdio.h > int main() { // printf() displays the string inside quotation printf("Hello, World!"); return 0; }
So after you generate the binary helloworld
using the gcc
compiler:
gcc helloworld.c -o helloworld
You’ve to edit the executable using vim
:
vim helloworld
The last step is to use the xxd
command to transform the result to the hex
presentation by doing :%!xxd
.
Top comments (0)