Skip to content

Instantly share code, notes, and snippets.

@sejima
Created September 23, 2015 03:31
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 sejima/e358fc71d12db9b89d86 to your computer and use it in GitHub Desktop.
Save sejima/e358fc71d12db9b89d86 to your computer and use it in GitHub Desktop.
$ export PS1="Xeon L5630:\w$ "
Xeon L5630:~$ for i in 1 2; do gcc -O2 -Wall -Werror test$i.c -o test$i; done
Xeon L5630:~$ diff -u <(objdump -d test1) <(objdump -d test2)
--- /dev/fd/63 2015-09-15 15:06:00.529163166 +0900
+++ /dev/fd/62 2015-09-15 15:06:00.529163166 +0900
@@ -1,5 +1,5 @@
-test1: file format elf64-x86-64
+test2: file format elf64-x86-64
Disassembly of section .init:
@@ -60,7 +60,7 @@
0000000000400590 <main>:
400590: 41 56 push %r14
400592: bf 00 00 00 10 mov $0x10000000,%edi
- 400597: 41 be 00 00 10 00 mov $0x100000,%r14d
+ 400597: 41 be 00 01 00 00 mov $0x100,%r14d
40059d: 41 55 push %r13
40059f: 41 54 push %r12
4005a1: 55 push %rbp
@@ -70,8 +70,8 @@
4005aa: 49 89 c4 mov %rax,%r12
4005ad: ba 00 00 00 10 mov $0x10000000,%edx
4005b2: be 0a 00 00 00 mov $0xa,%esi
- 4005b7: 4d 8d ac 24 00 00 01 lea 0x10000(%r12),%r13
- 4005be: 00
+ 4005b7: 4d 8d ac 24 00 00 00 lea 0x10000000(%r12),%r13
+ 4005be: 10
4005bf: 48 89 c7 mov %rax,%rdi
4005c2: e8 69 ff ff ff callq 400530 <memset@plt>
4005c7: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
Xeon L5630:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment