Skip to content

Instantly share code, notes, and snippets.

@master-q
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save master-q/9189100 to your computer and use it in GitHub Desktop.
Save master-q/9189100 to your computer and use it in GitHub Desktop.
void main
casper$ cat main.c
#include <stdio.h>
void main()
{
printf("hoge\n");
}
casper$ gcc -g main.c
casper$ objdump -S a.out|lv
00000000004004fd <main>:
#include <stdio.h>
void main()
{
4004fd: 55 push %rbp
4004fe: 48 89 e5 mov %rsp,%rbp
printf("hoge\n");
400501: bf 94 05 40 00 mov $0x400594,%edi
400506: e8 d5 fe ff ff callq 4003e0 <puts@plt>
}
40050b: 5d pop %rbp
40050c: c3 retq
40050d: 0f 1f 00 nopl (%rax)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment