Skip to content

Instantly share code, notes, and snippets.

@GoldsteinE
Created April 6, 2020 19:53
Show Gist options
  • Save GoldsteinE/467ffdc218a6a67d8498b7ad5928376b to your computer and use it in GitHub Desktop.
Save GoldsteinE/467ffdc218a6a67d8498b7ad5928376b to your computer and use it in GitHub Desktop.
test.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <f>:
0: 8d 47 01 lea 0x1(%rdi),%eax
3: c3 retq
4: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1)
b: 00 00 00 00
f: 90 nop
0000000000000010 <g>:
10: 8d 47 01 lea 0x1(%rdi),%eax
13: c3 retq
14: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1)
1b: 00 00 00 00
1f: 90 nop
0000000000000020 <h>:
20: 8d 47 01 lea 0x1(%rdi),%eax
23: c3 retq
extern "C" int f(int x) {
x++;
return x;
}
extern "C" int g(int x) {
x += 1;
return x;
}
extern "C" int h(int x) {
x = x + 1;
return x;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment