Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shigemk2/6ca1890e2f51192e4cd9 to your computer and use it in GitHub Desktop.
Save shigemk2/6ca1890e2f51192e4cd9 to your computer and use it in GitHub Desktop.
void inc(int &x) {
++x;
}
void inc(int *x) {
++*x;
}
param.o: ファイル形式 elf64-x86-64
セクション .text の逆アセンブル:
0000000000000000 <_Z3incRi>:
0: 83 07 01 addl $0x1,(%rdi)
3: c3 retq
0000000000000004 <_Z3incPi>:
4: 83 07 01 addl $0x1,(%rdi)
7: c3 retq
g++ -O -fomit-frame-pointer -m64 -c -g param.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment