Skip to content

Instantly share code, notes, and snippets.

@usagi
Created December 23, 2012 06:40
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 usagi/4362322 to your computer and use it in GitHub Desktop.
Save usagi/4362322 to your computer and use it in GitHub Desktop.
master_macro_c.O1: file format elf64-x86-64
Disassembly of section .init:
0000000000400568 <_init>:
400568: 48 83 ec 08 sub $0x8,%rsp
40056c: e8 bb 00 00 00 callq 40062c <call_gmon_start>
400571: 48 83 c4 08 add $0x8,%rsp
400575: c3 retq
Disassembly of section .plt:
0000000000400580 <free@plt-0x10>:
400580: ff 35 6a 0a 20 00 pushq 0x200a6a(%rip) # 600ff0 <_GLOBAL_OFFSET_TABLE_+0x8>
400586: ff 25 6c 0a 20 00 jmpq *0x200a6c(%rip) # 600ff8 <_GLOBAL_OFFSET_TABLE_+0x10>
40058c: 0f 1f 40 00 nopl 0x0(%rax)
0000000000400590 <free@plt>:
400590: ff 25 6a 0a 20 00 jmpq *0x200a6a(%rip) # 601000 <_GLOBAL_OFFSET_TABLE_+0x18>
400596: 68 00 00 00 00 pushq $0x0
40059b: e9 e0 ff ff ff jmpq 400580 <_init+0x18>
00000000004005a0 <puts@plt>:
4005a0: ff 25 62 0a 20 00 jmpq *0x200a62(%rip) # 601008 <_GLOBAL_OFFSET_TABLE_+0x20>
4005a6: 68 01 00 00 00 pushq $0x1
4005ab: e9 d0 ff ff ff jmpq 400580 <_init+0x18>
00000000004005b0 <clock@plt>:
4005b0: ff 25 5a 0a 20 00 jmpq *0x200a5a(%rip) # 601010 <_GLOBAL_OFFSET_TABLE_+0x28>
4005b6: 68 02 00 00 00 pushq $0x2
4005bb: e9 c0 ff ff ff jmpq 400580 <_init+0x18>
00000000004005c0 <printf@plt>:
4005c0: ff 25 52 0a 20 00 jmpq *0x200a52(%rip) # 601018 <_GLOBAL_OFFSET_TABLE_+0x30>
4005c6: 68 03 00 00 00 pushq $0x3
4005cb: e9 b0 ff ff ff jmpq 400580 <_init+0x18>
00000000004005d0 <__libc_start_main@plt>:
4005d0: ff 25 4a 0a 20 00 jmpq *0x200a4a(%rip) # 601020 <_GLOBAL_OFFSET_TABLE_+0x38>
4005d6: 68 04 00 00 00 pushq $0x4
4005db: e9 a0 ff ff ff jmpq 400580 <_init+0x18>
00000000004005e0 <calloc@plt>:
4005e0: ff 25 42 0a 20 00 jmpq *0x200a42(%rip) # 601028 <_GLOBAL_OFFSET_TABLE_+0x40>
4005e6: 68 05 00 00 00 pushq $0x5
4005eb: e9 90 ff ff ff jmpq 400580 <_init+0x18>
00000000004005f0 <setvbuf@plt>:
4005f0: ff 25 3a 0a 20 00 jmpq *0x200a3a(%rip) # 601030 <_GLOBAL_OFFSET_TABLE_+0x48>
4005f6: 68 06 00 00 00 pushq $0x6
4005fb: e9 80 ff ff ff jmpq 400580 <_init+0x18>
Disassembly of section .text:
0000000000400600 <_start>:
400600: 31 ed xor %ebp,%ebp
400602: 49 89 d1 mov %rdx,%r9
400605: 5e pop %rsi
400606: 48 89 e2 mov %rsp,%rdx
400609: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
40060d: 50 push %rax
40060e: 54 push %rsp
40060f: 49 c7 c0 b0 08 40 00 mov $0x4008b0,%r8
400616: 48 c7 c1 20 08 40 00 mov $0x400820,%rcx
40061d: 48 c7 c7 4d 07 40 00 mov $0x40074d,%rdi
400624: e8 a7 ff ff ff callq 4005d0 <__libc_start_main@plt>
400629: f4 hlt
40062a: 90 nop
40062b: 90 nop
000000000040062c <call_gmon_start>:
40062c: 48 83 ec 08 sub $0x8,%rsp
400630: 48 8b 05 a9 09 20 00 mov 0x2009a9(%rip),%rax # 600fe0 <_DYNAMIC+0x1e0>
400637: 48 85 c0 test %rax,%rax
40063a: 74 02 je 40063e <call_gmon_start+0x12>
40063c: ff d0 callq *%rax
40063e: 48 83 c4 08 add $0x8,%rsp
400642: c3 retq
400643: 90 nop
400644: 90 nop
400645: 90 nop
400646: 90 nop
400647: 90 nop
400648: 90 nop
400649: 90 nop
40064a: 90 nop
40064b: 90 nop
40064c: 90 nop
40064d: 90 nop
40064e: 90 nop
40064f: 90 nop
0000000000400650 <deregister_tm_clones>:
400650: b8 4f 10 60 00 mov $0x60104f,%eax
400655: 55 push %rbp
400656: 48 2d 48 10 60 00 sub $0x601048,%rax
40065c: 48 83 f8 0e cmp $0xe,%rax
400660: 48 89 e5 mov %rsp,%rbp
400663: 77 02 ja 400667 <deregister_tm_clones+0x17>
400665: 5d pop %rbp
400666: c3 retq
400667: b8 00 00 00 00 mov $0x0,%eax
40066c: 48 85 c0 test %rax,%rax
40066f: 74 f4 je 400665 <deregister_tm_clones+0x15>
400671: 5d pop %rbp
400672: bf 48 10 60 00 mov $0x601048,%edi
400677: ff e0 jmpq *%rax
400679: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
0000000000400680 <register_tm_clones>:
400680: b8 48 10 60 00 mov $0x601048,%eax
400685: 55 push %rbp
400686: 48 2d 48 10 60 00 sub $0x601048,%rax
40068c: 48 c1 f8 03 sar $0x3,%rax
400690: 48 89 e5 mov %rsp,%rbp
400693: 48 89 c2 mov %rax,%rdx
400696: 48 c1 ea 3f shr $0x3f,%rdx
40069a: 48 01 d0 add %rdx,%rax
40069d: 48 89 c6 mov %rax,%rsi
4006a0: 48 d1 fe sar %rsi
4006a3: 75 02 jne 4006a7 <register_tm_clones+0x27>
4006a5: 5d pop %rbp
4006a6: c3 retq
4006a7: ba 00 00 00 00 mov $0x0,%edx
4006ac: 48 85 d2 test %rdx,%rdx
4006af: 74 f4 je 4006a5 <register_tm_clones+0x25>
4006b1: 5d pop %rbp
4006b2: bf 48 10 60 00 mov $0x601048,%edi
4006b7: ff e2 jmpq *%rdx
4006b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
00000000004006c0 <__do_global_dtors_aux>:
4006c0: 80 3d 91 09 20 00 00 cmpb $0x0,0x200991(%rip) # 601058 <completed.6098>
4006c7: 75 11 jne 4006da <__do_global_dtors_aux+0x1a>
4006c9: 55 push %rbp
4006ca: 48 89 e5 mov %rsp,%rbp
4006cd: e8 7e ff ff ff callq 400650 <deregister_tm_clones>
4006d2: 5d pop %rbp
4006d3: c6 05 7e 09 20 00 01 movb $0x1,0x20097e(%rip) # 601058 <completed.6098>
4006da: f3 c3 repz retq
4006dc: 0f 1f 40 00 nopl 0x0(%rax)
00000000004006e0 <frame_dummy>:
4006e0: 48 83 3d 10 07 20 00 cmpq $0x0,0x200710(%rip) # 600df8 <__JCR_END__>
4006e7: 00
4006e8: 74 1b je 400705 <frame_dummy+0x25>
4006ea: b8 00 00 00 00 mov $0x0,%eax
4006ef: 48 85 c0 test %rax,%rax
4006f2: 74 11 je 400705 <frame_dummy+0x25>
4006f4: 55 push %rbp
4006f5: bf f8 0d 60 00 mov $0x600df8,%edi
4006fa: 48 89 e5 mov %rsp,%rbp
4006fd: ff d0 callq *%rax
4006ff: 5d pop %rbp
400700: e9 7b ff ff ff jmpq 400680 <register_tm_clones>
400705: e9 76 ff ff ff jmpq 400680 <register_tm_clones>
40070a: 90 nop
40070b: 90 nop
000000000040070c <test_bitmap_color_transform_macro_c>:
40070c: 48 8d b7 00 48 3f 00 lea 0x3f4800(%rdi),%rsi
400713: 0f b7 07 movzwl (%rdi),%eax
400716: 89 c1 mov %eax,%ecx
400718: 66 c1 e9 08 shr $0x8,%cx
40071c: 81 e1 f8 00 00 00 and $0xf8,%ecx
400722: c1 e9 03 shr $0x3,%ecx
400725: 89 c2 mov %eax,%edx
400727: c1 e2 05 shl $0x5,%edx
40072a: 66 81 e2 00 f8 and $0xf800,%dx
40072f: 09 d1 or %edx,%ecx
400731: c1 e0 06 shl $0x6,%eax
400734: 89 c2 mov %eax,%edx
400736: 66 81 e2 c0 07 and $0x7c0,%dx
40073b: 89 c8 mov %ecx,%eax
40073d: 09 d0 or %edx,%eax
40073f: 66 89 07 mov %ax,(%rdi)
400742: 48 83 c7 02 add $0x2,%rdi
400746: 48 39 f7 cmp %rsi,%rdi
400749: 75 c8 jne 400713 <test_bitmap_color_transform_macro_c+0x7>
40074b: f3 c3 repz retq
000000000040074d <main>:
40074d: 41 55 push %r13
40074f: 41 54 push %r12
400751: 55 push %rbp
400752: 53 push %rbx
400753: 48 83 ec 08 sub $0x8,%rsp
400757: be 02 00 00 00 mov $0x2,%esi
40075c: bf 00 a4 1f 00 mov $0x1fa400,%edi
400761: e8 7a fe ff ff callq 4005e0 <calloc@plt>
400766: 49 89 c5 mov %rax,%r13
400769: b9 00 00 00 00 mov $0x0,%ecx
40076e: ba 02 00 00 00 mov $0x2,%edx
400773: be 00 00 00 00 mov $0x0,%esi
400778: 48 8b 3d d1 08 20 00 mov 0x2008d1(%rip),%rdi # 601050 <stdout@@GLIBC_2.2.5>
40077f: e8 6c fe ff ff callq 4005f0 <setvbuf@plt>
400784: bf cc 08 40 00 mov $0x4008cc,%edi
400789: e8 12 fe ff ff callq 4005a0 <puts@plt>
40078e: bd 00 00 00 00 mov $0x0,%ebp
400793: bb e8 03 00 00 mov $0x3e8,%ebx
400798: e8 13 fe ff ff callq 4005b0 <clock@plt>
40079d: 49 89 c4 mov %rax,%r12
4007a0: 4c 89 ef mov %r13,%rdi
4007a3: e8 64 ff ff ff callq 40070c <test_bitmap_color_transform_macro_c>
4007a8: e8 03 fe ff ff callq 4005b0 <clock@plt>
4007ad: 48 89 c2 mov %rax,%rdx
4007b0: 4c 29 e2 sub %r12,%rdx
4007b3: 48 01 d5 add %rdx,%rbp
4007b6: 89 de mov %ebx,%esi
4007b8: bf d2 08 40 00 mov $0x4008d2,%edi
4007bd: b8 00 00 00 00 mov $0x0,%eax
4007c2: e8 f9 fd ff ff callq 4005c0 <printf@plt>
4007c7: 83 eb 01 sub $0x1,%ebx
4007ca: 75 cc jne 400798 <main+0x4b>
4007cc: bf de 08 40 00 mov $0x4008de,%edi
4007d1: e8 ca fd ff ff callq 4005a0 <puts@plt>
4007d6: 4c 89 ef mov %r13,%rdi
4007d9: e8 b2 fd ff ff callq 400590 <free@plt>
4007de: f2 48 0f 2a c5 cvtsi2sd %rbp,%xmm0
4007e3: f2 0f 5e 05 25 01 00 divsd 0x125(%rip),%xmm0 # 400910 <_IO_stdin_used+0x48>
4007ea: 00
4007eb: f2 0f 5e 05 25 01 00 divsd 0x125(%rip),%xmm0 # 400918 <_IO_stdin_used+0x50>
4007f2: 00
4007f3: bf ef 08 40 00 mov $0x4008ef,%edi
4007f8: b8 01 00 00 00 mov $0x1,%eax
4007fd: e8 be fd ff ff callq 4005c0 <printf@plt>
400802: b8 00 00 00 00 mov $0x0,%eax
400807: 48 83 c4 08 add $0x8,%rsp
40080b: 5b pop %rbx
40080c: 5d pop %rbp
40080d: 41 5c pop %r12
40080f: 41 5d pop %r13
400811: c3 retq
400812: 90 nop
400813: 90 nop
400814: 90 nop
400815: 90 nop
400816: 90 nop
400817: 90 nop
400818: 90 nop
400819: 90 nop
40081a: 90 nop
40081b: 90 nop
40081c: 90 nop
40081d: 90 nop
40081e: 90 nop
40081f: 90 nop
0000000000400820 <__libc_csu_init>:
400820: 48 89 6c 24 d8 mov %rbp,-0x28(%rsp)
400825: 4c 89 64 24 e0 mov %r12,-0x20(%rsp)
40082a: 48 8d 2d bf 05 20 00 lea 0x2005bf(%rip),%rbp # 600df0 <__init_array_end>
400831: 4c 8d 25 b0 05 20 00 lea 0x2005b0(%rip),%r12 # 600de8 <__frame_dummy_init_array_entry>
400838: 48 89 5c 24 d0 mov %rbx,-0x30(%rsp)
40083d: 4c 89 6c 24 e8 mov %r13,-0x18(%rsp)
400842: 4c 89 74 24 f0 mov %r14,-0x10(%rsp)
400847: 4c 89 7c 24 f8 mov %r15,-0x8(%rsp)
40084c: 48 83 ec 38 sub $0x38,%rsp
400850: 4c 29 e5 sub %r12,%rbp
400853: 41 89 ff mov %edi,%r15d
400856: 49 89 f6 mov %rsi,%r14
400859: 48 c1 fd 03 sar $0x3,%rbp
40085d: 49 89 d5 mov %rdx,%r13
400860: 31 db xor %ebx,%ebx
400862: e8 01 fd ff ff callq 400568 <_init>
400867: 48 85 ed test %rbp,%rbp
40086a: 74 1a je 400886 <__libc_csu_init+0x66>
40086c: 0f 1f 40 00 nopl 0x0(%rax)
400870: 4c 89 ea mov %r13,%rdx
400873: 4c 89 f6 mov %r14,%rsi
400876: 44 89 ff mov %r15d,%edi
400879: 41 ff 14 dc callq *(%r12,%rbx,8)
40087d: 48 83 c3 01 add $0x1,%rbx
400881: 48 39 eb cmp %rbp,%rbx
400884: 75 ea jne 400870 <__libc_csu_init+0x50>
400886: 48 8b 5c 24 08 mov 0x8(%rsp),%rbx
40088b: 48 8b 6c 24 10 mov 0x10(%rsp),%rbp
400890: 4c 8b 64 24 18 mov 0x18(%rsp),%r12
400895: 4c 8b 6c 24 20 mov 0x20(%rsp),%r13
40089a: 4c 8b 74 24 28 mov 0x28(%rsp),%r14
40089f: 4c 8b 7c 24 30 mov 0x30(%rsp),%r15
4008a4: 48 83 c4 38 add $0x38,%rsp
4008a8: c3 retq
4008a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
00000000004008b0 <__libc_csu_fini>:
4008b0: f3 c3 repz retq
4008b2: 90 nop
4008b3: 90 nop
Disassembly of section .fini:
00000000004008b4 <_fini>:
4008b4: 55 push %rbp
4008b5: 48 83 ec 08 sub $0x8,%rsp
4008b9: e8 06 00 00 00 callq 4008c4 <_real_fini>
4008be: 48 83 c4 08 add $0x8,%rsp
4008c2: 5d pop %rbp
4008c3: c3 retq
00000000004008c4 <_real_fini>:
4008c4: c3 retq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment