251 lines
11 KiB
Plaintext
251 lines
11 KiB
Plaintext
|
|
a.out: Dateiformat elf64-x86-64
|
|
|
|
|
|
Disassembly of section .init:
|
|
|
|
0000000000400378 <_init>:
|
|
400378: 48 83 ec 08 sub $0x8,%rsp
|
|
40037c: 48 8b 05 75 0c 20 00 mov 0x200c75(%rip),%rax # 600ff8 <__gmon_start__>
|
|
400383: 48 85 c0 test %rax,%rax
|
|
400386: 74 02 je 40038a <_init+0x12>
|
|
400388: ff d0 callq *%rax
|
|
40038a: e8 61 00 00 00 callq 4003f0 <__do_global_ctors_aux>
|
|
40038f: 48 83 c4 08 add $0x8,%rsp
|
|
400393: c3 retq
|
|
|
|
Disassembly of section .plt:
|
|
|
|
00000000004003a0 <.plt>:
|
|
4003a0: ff 35 62 0c 20 00 pushq 0x200c62(%rip) # 601008 <_GLOBAL_OFFSET_TABLE_+0x8>
|
|
4003a6: ff 25 64 0c 20 00 jmpq *0x200c64(%rip) # 601010 <_GLOBAL_OFFSET_TABLE_+0x10>
|
|
4003ac: 0f 1f 40 00 nopl 0x0(%rax)
|
|
|
|
00000000004003b0 <printf@plt>:
|
|
4003b0: ff 25 62 0c 20 00 jmpq *0x200c62(%rip) # 601018 <printf@GLIBC_2.2.5>
|
|
4003b6: 68 00 00 00 00 pushq $0x0
|
|
4003bb: e9 e0 ff ff ff jmpq 4003a0 <.plt>
|
|
|
|
Disassembly of section .text:
|
|
|
|
00000000004003c0 <_start>:
|
|
4003c0: 31 ed xor %ebp,%ebp
|
|
4003c2: 49 89 d1 mov %rdx,%r9
|
|
4003c5: 5e pop %rsi
|
|
4003c6: 48 89 e2 mov %rsp,%rdx
|
|
4003c9: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
|
|
4003cd: 50 push %rax
|
|
4003ce: 54 push %rsp
|
|
4003cf: 49 c7 c0 00 06 40 00 mov $0x400600,%r8
|
|
4003d6: 48 c7 c1 90 05 40 00 mov $0x400590,%rcx
|
|
4003dd: 48 c7 c7 28 05 40 00 mov $0x400528,%rdi
|
|
4003e4: ff 15 06 0c 20 00 callq *0x200c06(%rip) # 600ff0 <__libc_start_main@GLIBC_2.2.5>
|
|
4003ea: f4 hlt
|
|
4003eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
|
|
|
|
00000000004003f0 <__do_global_ctors_aux>:
|
|
4003f0: 8b 05 36 0c 20 00 mov 0x200c36(%rip),%eax # 60102c <initialized.1836>
|
|
4003f6: 85 c0 test %eax,%eax
|
|
4003f8: 74 06 je 400400 <__do_global_ctors_aux+0x10>
|
|
4003fa: f3 c3 repz retq
|
|
4003fc: 0f 1f 40 00 nopl 0x0(%rax)
|
|
400400: 55 push %rbp
|
|
400401: 53 push %rbx
|
|
400402: 48 83 ec 08 sub $0x8,%rsp
|
|
400406: 48 8b 05 33 0a 20 00 mov 0x200a33(%rip),%rax # 600e40 <__CTOR_LIST__>
|
|
40040d: c7 05 15 0c 20 00 01 movl $0x1,0x200c15(%rip) # 60102c <initialized.1836>
|
|
400414: 00 00 00
|
|
400417: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
|
|
40041b: 48 89 c1 mov %rax,%rcx
|
|
40041e: 74 38 je 400458 <__do_global_ctors_aux+0x68>
|
|
400420: 48 8d 15 19 0a 20 00 lea 0x200a19(%rip),%rdx # 600e40 <__CTOR_LIST__>
|
|
400427: 48 85 c0 test %rax,%rax
|
|
40042a: 48 8d 58 ff lea -0x1(%rax),%rbx
|
|
40042e: 48 8d 14 c2 lea (%rdx,%rax,8),%rdx
|
|
400432: 74 1a je 40044e <__do_global_ctors_aux+0x5e>
|
|
400434: 48 89 d8 mov %rbx,%rax
|
|
400437: 48 f7 d8 neg %rax
|
|
40043a: 48 8d 2c c2 lea (%rdx,%rax,8),%rbp
|
|
40043e: 66 90 xchg %ax,%ax
|
|
400440: ff 54 dd 00 callq *0x0(%rbp,%rbx,8)
|
|
400444: 48 83 eb 01 sub $0x1,%rbx
|
|
400448: 48 83 fb ff cmp $0xffffffffffffffff,%rbx
|
|
40044c: 75 f2 jne 400440 <__do_global_ctors_aux+0x50>
|
|
40044e: 48 83 c4 08 add $0x8,%rsp
|
|
400452: 5b pop %rbx
|
|
400453: 5d pop %rbp
|
|
400454: c3 retq
|
|
400455: 0f 1f 00 nopl (%rax)
|
|
400458: 48 83 3d e8 09 20 00 cmpq $0x0,0x2009e8(%rip) # 600e48 <__CTOR_LIST__+0x8>
|
|
40045f: 00
|
|
400460: 74 ec je 40044e <__do_global_ctors_aux+0x5e>
|
|
400462: b8 01 00 00 00 mov $0x1,%eax
|
|
400467: eb 0a jmp 400473 <__do_global_ctors_aux+0x83>
|
|
400469: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
|
|
400470: 48 89 d0 mov %rdx,%rax
|
|
400473: 48 85 c9 test %rcx,%rcx
|
|
400476: 48 8d 50 01 lea 0x1(%rax),%rdx
|
|
40047a: 75 f4 jne 400470 <__do_global_ctors_aux+0x80>
|
|
40047c: eb a2 jmp 400420 <__do_global_ctors_aux+0x30>
|
|
40047e: 66 90 xchg %ax,%ax
|
|
|
|
0000000000400480 <__do_global_dtors_aux>:
|
|
400480: 8b 05 a2 0b 20 00 mov 0x200ba2(%rip),%eax # 601028 <_edata>
|
|
400486: 85 c0 test %eax,%eax
|
|
400488: 75 46 jne 4004d0 <__do_global_dtors_aux+0x50>
|
|
40048a: 48 8b 05 c7 09 20 00 mov 0x2009c7(%rip),%rax # 600e58 <__DTOR_LIST__+0x8>
|
|
400491: 48 85 c0 test %rax,%rax
|
|
400494: 74 2a je 4004c0 <__do_global_dtors_aux+0x40>
|
|
400496: 53 push %rbx
|
|
400497: 48 8d 1d ba 09 20 00 lea 0x2009ba(%rip),%rbx # 600e58 <__DTOR_LIST__+0x8>
|
|
40049e: 66 90 xchg %ax,%ax
|
|
4004a0: 48 83 c3 08 add $0x8,%rbx
|
|
4004a4: ff d0 callq *%rax
|
|
4004a6: 48 8b 03 mov (%rbx),%rax
|
|
4004a9: 48 85 c0 test %rax,%rax
|
|
4004ac: 75 f2 jne 4004a0 <__do_global_dtors_aux+0x20>
|
|
4004ae: c7 05 70 0b 20 00 01 movl $0x1,0x200b70(%rip) # 601028 <_edata>
|
|
4004b5: 00 00 00
|
|
4004b8: 5b pop %rbx
|
|
4004b9: c3 retq
|
|
4004ba: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
|
|
4004c0: c7 05 5e 0b 20 00 01 movl $0x1,0x200b5e(%rip) # 601028 <_edata>
|
|
4004c7: 00 00 00
|
|
4004ca: c3 retq
|
|
4004cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
|
|
4004d0: f3 c3 repz retq
|
|
4004d2: 0f 1f 40 00 nopl 0x0(%rax)
|
|
4004d6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
|
|
4004dd: 00 00 00
|
|
|
|
00000000004004e0 <__call___do_global_ctors_aux>:
|
|
4004e0: 48 83 ec 08 sub $0x8,%rsp
|
|
4004e4: 48 83 c4 08 add $0x8,%rsp
|
|
4004e8: c3 retq
|
|
4004e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
|
|
|
|
00000000004004f0 <__call___do_global_dtors_aux>:
|
|
4004f0: 48 83 ec 08 sub $0x8,%rsp
|
|
4004f4: 48 83 c4 08 add $0x8,%rsp
|
|
4004f8: c3 retq
|
|
4004f9: 0f 1f 00 nopl (%rax)
|
|
|
|
00000000004004fc <sum>:
|
|
|
|
int global = 8150;
|
|
|
|
|
|
int sum(int,int);
|
|
|
|
4004fc: 55 push %rbp
|
|
4004fd: 48 89 e5 mov %rsp,%rbp
|
|
400500: 48 83 ec 10 sub $0x10,%rsp
|
|
400504: 89 7d f8 mov %edi,-0x8(%rbp)
|
|
400507: 89 75 f4 mov %esi,-0xc(%rbp)
|
|
int sum(int a, int b){
|
|
40050a: c7 45 fc c3 01 00 00 movl $0x1c3,-0x4(%rbp)
|
|
int result = 451;
|
|
400511: 8b 45 f8 mov -0x8(%rbp),%eax
|
|
400514: 03 45 f4 add -0xc(%rbp),%eax
|
|
400517: 89 45 fc mov %eax,-0x4(%rbp)
|
|
result = a + b;
|
|
40051a: 8b 45 fc mov -0x4(%rbp),%eax
|
|
40051d: 89 45 f0 mov %eax,-0x10(%rbp)
|
|
400520: eb 00 jmp 400522 <sum+0x26>
|
|
return result;
|
|
400522: 8b 45 f0 mov -0x10(%rbp),%eax
|
|
400525: c9 leaveq
|
|
400526: c3 retq
|
|
400527: 90 nop
|
|
|
|
0000000000400528 <main>:
|
|
}
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
400528: 55 push %rbp
|
|
400529: 48 89 e5 mov %rsp,%rbp
|
|
40052c: 48 83 ec 30 sub $0x30,%rsp
|
|
400530: 89 7d f8 mov %edi,-0x8(%rbp)
|
|
400533: 48 89 75 f0 mov %rsi,-0x10(%rbp)
|
|
{
|
|
400537: c7 45 fc 67 12 00 00 movl $0x1267,-0x4(%rbp)
|
|
int local=4711;
|
|
40053e: 48 b8 18 06 40 00 00 movabs $0x400618,%rax
|
|
400545: 00 00 00
|
|
400548: 48 89 45 e8 mov %rax,-0x18(%rbp)
|
|
40054c: 8b 45 fc mov -0x4(%rbp),%eax
|
|
40054f: 89 45 e4 mov %eax,-0x1c(%rbp)
|
|
400552: 8b 55 e4 mov -0x1c(%rbp),%edx
|
|
400555: 8b 35 c9 0a 20 00 mov 0x200ac9(%rip),%esi # 601024 <global>
|
|
40055b: 48 8b 7d e8 mov -0x18(%rbp),%rdi
|
|
40055f: 31 c0 xor %eax,%eax
|
|
400561: e8 4a fe ff ff callq 4003b0 <printf@plt>
|
|
printf("Hello, world!\nglobal=%d local=%d\n", global, local);
|
|
400566: 8b 45 fc mov -0x4(%rbp),%eax
|
|
400569: 89 45 e0 mov %eax,-0x20(%rbp)
|
|
40056c: 8b 75 e0 mov -0x20(%rbp),%esi
|
|
40056f: 8b 3d af 0a 20 00 mov 0x200aaf(%rip),%edi # 601024 <global>
|
|
400575: e8 82 ff ff ff callq 4004fc <sum>
|
|
40057a: 89 45 fc mov %eax,-0x4(%rbp)
|
|
printf(func1(2));
|
|
40057d: 8b 45 fc mov -0x4(%rbp),%eax
|
|
400580: 89 45 dc mov %eax,-0x24(%rbp)
|
|
400583: eb 00 jmp 400585 <main+0x5d>
|
|
local = sum(global, local);
|
|
400585: 8b 45 dc mov -0x24(%rbp),%eax
|
|
400588: c9 leaveq
|
|
400589: c3 retq
|
|
40058a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
|
|
|
|
0000000000400590 <__libc_csu_init>:
|
|
400590: 41 57 push %r15
|
|
400592: 41 56 push %r14
|
|
400594: 41 89 ff mov %edi,%r15d
|
|
400597: 41 55 push %r13
|
|
400599: 41 54 push %r12
|
|
40059b: 4c 8d 25 9e 08 20 00 lea 0x20089e(%rip),%r12 # 600e40 <__CTOR_LIST__>
|
|
4005a2: 55 push %rbp
|
|
4005a3: 48 8d 2d 96 08 20 00 lea 0x200896(%rip),%rbp # 600e40 <__CTOR_LIST__>
|
|
4005aa: 53 push %rbx
|
|
4005ab: 49 89 f6 mov %rsi,%r14
|
|
4005ae: 49 89 d5 mov %rdx,%r13
|
|
4005b1: 4c 29 e5 sub %r12,%rbp
|
|
4005b4: 48 83 ec 08 sub $0x8,%rsp
|
|
4005b8: 48 c1 fd 03 sar $0x3,%rbp
|
|
4005bc: e8 b7 fd ff ff callq 400378 <_init>
|
|
4005c1: 48 85 ed test %rbp,%rbp
|
|
4005c4: 74 20 je 4005e6 <__libc_csu_init+0x56>
|
|
4005c6: 31 db xor %ebx,%ebx
|
|
4005c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
|
|
4005cf: 00
|
|
4005d0: 4c 89 ea mov %r13,%rdx
|
|
4005d3: 4c 89 f6 mov %r14,%rsi
|
|
4005d6: 44 89 ff mov %r15d,%edi
|
|
4005d9: 41 ff 14 dc callq *(%r12,%rbx,8)
|
|
4005dd: 48 83 c3 01 add $0x1,%rbx
|
|
4005e1: 48 39 dd cmp %rbx,%rbp
|
|
4005e4: 75 ea jne 4005d0 <__libc_csu_init+0x40>
|
|
4005e6: 48 83 c4 08 add $0x8,%rsp
|
|
4005ea: 5b pop %rbx
|
|
4005eb: 5d pop %rbp
|
|
4005ec: 41 5c pop %r12
|
|
4005ee: 41 5d pop %r13
|
|
4005f0: 41 5e pop %r14
|
|
4005f2: 41 5f pop %r15
|
|
4005f4: c3 retq
|
|
4005f5: 90 nop
|
|
4005f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
|
|
4005fd: 00 00 00
|
|
|
|
0000000000400600 <__libc_csu_fini>:
|
|
400600: f3 c3 repz retq
|
|
|
|
Disassembly of section .fini:
|
|
|
|
0000000000400604 <_fini>:
|
|
400604: 48 83 ec 08 sub $0x8,%rsp
|
|
400608: e8 73 fe ff ff callq 400480 <__do_global_dtors_aux>
|
|
40060d: 48 83 c4 08 add $0x8,%rsp
|
|
400611: c3 retq
|