Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test: file format elf64-x86-64
- Disassembly of section .init:
- 0000000000400358 <_init>:
- 400358: 48 83 ec 08 sub $0x8,%rsp
- 40035c: e8 5b 00 00 00 callq 4003bc <call_gmon_start>
- 400361: e8 ea 00 00 00 callq 400450 <frame_dummy>
- 400366: e8 f5 01 00 00 callq 400560 <__do_global_ctors_aux>
- 40036b: 48 83 c4 08 add $0x8,%rsp
- 40036f: c3 retq
- Disassembly of section .plt:
- 0000000000400370 <__libc_start_main@plt-0x10>:
- 400370: ff 35 da 04 20 00 pushq 0x2004da(%rip) # 600850 <_GLOBAL_OFFSET_TABLE_+0x8>
- 400376: ff 25 dc 04 20 00 jmpq *0x2004dc(%rip) # 600858 <_GLOBAL_OFFSET_TABLE_+0x10>
- 40037c: 0f 1f 40 00 nopl 0x0(%rax)
- 0000000000400380 <__libc_start_main@plt>:
- 400380: ff 25 da 04 20 00 jmpq *0x2004da(%rip) # 600860 <_GLOBAL_OFFSET_TABLE_+0x18>
- 400386: 68 00 00 00 00 pushq $0x0
- 40038b: e9 e0 ff ff ff jmpq 400370 <_init+0x18>
- Disassembly of section .text:
- 0000000000400390 <_start>:
- 400390: 31 ed xor %ebp,%ebp
- 400392: 49 89 d1 mov %rdx,%r9
- 400395: 5e pop %rsi
- 400396: 48 89 e2 mov %rsp,%rdx
- 400399: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
- 40039d: 50 push %rax
- 40039e: 54 push %rsp
- 40039f: 49 c7 c0 c0 04 40 00 mov $0x4004c0,%r8
- 4003a6: 48 c7 c1 d0 04 40 00 mov $0x4004d0,%rcx
- 4003ad: 48 c7 c7 80 04 40 00 mov $0x400480,%rdi
- 4003b4: e8 c7 ff ff ff callq 400380 <__libc_start_main@plt>
- 4003b9: f4 hlt
- 4003ba: 90 nop
- 4003bb: 90 nop
- 00000000004003bc <call_gmon_start>:
- 4003bc: 48 83 ec 08 sub $0x8,%rsp
- 4003c0: 48 8b 05 79 04 20 00 mov 0x200479(%rip),%rax # 600840 <_DYNAMIC+0x190>
- 4003c7: 48 85 c0 test %rax,%rax
- 4003ca: 74 02 je 4003ce <call_gmon_start+0x12>
- 4003cc: ff d0 callq *%rax
- 4003ce: 48 83 c4 08 add $0x8,%rsp
- 4003d2: c3 retq
- 4003d3: 90 nop
- 4003d4: 90 nop
- 4003d5: 90 nop
- 4003d6: 90 nop
- 4003d7: 90 nop
- 4003d8: 90 nop
- 4003d9: 90 nop
- 4003da: 90 nop
- 4003db: 90 nop
- 4003dc: 90 nop
- 4003dd: 90 nop
- 4003de: 90 nop
- 4003df: 90 nop
- 00000000004003e0 <__do_global_dtors_aux>:
- 4003e0: 55 push %rbp
- 4003e1: 48 89 e5 mov %rsp,%rbp
- 4003e4: 53 push %rbx
- 4003e5: 48 83 ec 08 sub $0x8,%rsp
- 4003e9: 80 3d 80 04 20 00 00 cmpb $0x0,0x200480(%rip) # 600870 <completed.6349>
- 4003f0: 75 4b jne 40043d <__do_global_dtors_aux+0x5d>
- 4003f2: bb a0 06 60 00 mov $0x6006a0,%ebx
- 4003f7: 48 8b 05 7a 04 20 00 mov 0x20047a(%rip),%rax # 600878 <dtor_idx.6351>
- 4003fe: 48 81 eb 98 06 60 00 sub $0x600698,%rbx
- 400405: 48 c1 fb 03 sar $0x3,%rbx
- 400409: 48 83 eb 01 sub $0x1,%rbx
- 40040d: 48 39 d8 cmp %rbx,%rax
- 400410: 73 24 jae 400436 <__do_global_dtors_aux+0x56>
- 400412: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
- 400418: 48 83 c0 01 add $0x1,%rax
- 40041c: 48 89 05 55 04 20 00 mov %rax,0x200455(%rip) # 600878 <dtor_idx.6351>
- 400423: ff 14 c5 98 06 60 00 callq *0x600698(,%rax,8)
- 40042a: 48 8b 05 47 04 20 00 mov 0x200447(%rip),%rax # 600878 <dtor_idx.6351>
- 400431: 48 39 d8 cmp %rbx,%rax
- 400434: 72 e2 jb 400418 <__do_global_dtors_aux+0x38>
- 400436: c6 05 33 04 20 00 01 movb $0x1,0x200433(%rip) # 600870 <completed.6349>
- 40043d: 48 83 c4 08 add $0x8,%rsp
- 400441: 5b pop %rbx
- 400442: c9 leaveq
- 400443: c3 retq
- 400444: 66 66 66 2e 0f 1f 84 data32 data32 nopw %cs:0x0(%rax,%rax,1)
- 40044b: 00 00 00 00 00
- 0000000000400450 <frame_dummy>:
- 400450: 48 83 3d 50 02 20 00 cmpq $0x0,0x200250(%rip) # 6006a8 <__JCR_END__>
- 400457: 00
- 400458: 55 push %rbp
- 400459: 48 89 e5 mov %rsp,%rbp
- 40045c: 74 12 je 400470 <frame_dummy+0x20>
- 40045e: b8 00 00 00 00 mov $0x0,%eax
- 400463: 48 85 c0 test %rax,%rax
- 400466: 74 08 je 400470 <frame_dummy+0x20>
- 400468: bf a8 06 60 00 mov $0x6006a8,%edi
- 40046d: c9 leaveq
- 40046e: ff e0 jmpq *%rax
- 400470: c9 leaveq
- 400471: c3 retq
- 400472: 90 nop
- 400473: 90 nop
- 0000000000400474 <f>:
- int f(int i)
- {
- 400474: 55 push %rbp
- 400475: 48 89 e5 mov %rsp,%rbp
- 400478: 89 7d fc mov %edi,-0x4(%rbp)
- return i;
- 40047b: 8b 45 fc mov -0x4(%rbp),%eax
- }
- 40047e: c9 leaveq
- 40047f: c3 retq
- 0000000000400480 <main>:
- int main(int argC, char* argV[])
- {
- 400480: 55 push %rbp
- 400481: 48 89 e5 mov %rsp,%rbp
- 400484: 48 83 ec 20 sub $0x20,%rsp
- 400488: 89 7d ec mov %edi,-0x14(%rbp)
- 40048b: 48 89 75 e0 mov %rsi,-0x20(%rbp)
- int x = f(12);
- return 0;
- 40048f: 48 8d 84 24 08 d0 ff lea -0x2ff8(%rsp),%rax
- 400496: ff
- 400497: 48 c7 00 00 00 00 00 movq $0x0,(%rax)
- return i;
- }
- int main(int argC, char* argV[])
- {
- int x = f(12);
- 40049e: bf 0c 00 00 00 mov $0xc,%edi
- 4004a3: e8 cc ff ff ff callq 400474 <f>
- 4004a8: 89 45 fc mov %eax,-0x4(%rbp)
- return 0;
- 4004ab: b8 00 00 00 00 mov $0x0,%eax
- }
- 4004b0: c9 leaveq
- 4004b1: c3 retq
- 4004b2: 90 nop
- 4004b3: 90 nop
- 4004b4: 90 nop
- 4004b5: 90 nop
- 4004b6: 90 nop
- 4004b7: 90 nop
- 4004b8: 90 nop
- 4004b9: 90 nop
- 4004ba: 90 nop
- 4004bb: 90 nop
- 4004bc: 90 nop
- 4004bd: 90 nop
- 4004be: 90 nop
- 4004bf: 90 nop
- 00000000004004c0 <__libc_csu_fini>:
- 4004c0: f3 c3 repz retq
- 4004c2: 66 66 66 66 66 2e 0f data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1)
- 4004c9: 1f 84 00 00 00 00 00
- 00000000004004d0 <__libc_csu_init>:
- 4004d0: 48 89 6c 24 d8 mov %rbp,-0x28(%rsp)
- 4004d5: 4c 89 64 24 e0 mov %r12,-0x20(%rsp)
- 4004da: 48 8d 2d a3 01 20 00 lea 0x2001a3(%rip),%rbp # 600684 <__init_array_end>
- 4004e1: 4c 8d 25 9c 01 20 00 lea 0x20019c(%rip),%r12 # 600684 <__init_array_end>
- 4004e8: 4c 89 6c 24 e8 mov %r13,-0x18(%rsp)
- 4004ed: 4c 89 74 24 f0 mov %r14,-0x10(%rsp)
- 4004f2: 4c 89 7c 24 f8 mov %r15,-0x8(%rsp)
- 4004f7: 48 89 5c 24 d0 mov %rbx,-0x30(%rsp)
- 4004fc: 48 83 ec 38 sub $0x38,%rsp
- 400500: 4c 29 e5 sub %r12,%rbp
- 400503: 41 89 fd mov %edi,%r13d
- 400506: 49 89 f6 mov %rsi,%r14
- 400509: 48 c1 fd 03 sar $0x3,%rbp
- 40050d: 49 89 d7 mov %rdx,%r15
- 400510: e8 43 fe ff ff callq 400358 <_init>
- 400515: 48 85 ed test %rbp,%rbp
- 400518: 74 1c je 400536 <__libc_csu_init+0x66>
- 40051a: 31 db xor %ebx,%ebx
- 40051c: 0f 1f 40 00 nopl 0x0(%rax)
- 400520: 4c 89 fa mov %r15,%rdx
- 400523: 4c 89 f6 mov %r14,%rsi
- 400526: 44 89 ef mov %r13d,%edi
- 400529: 41 ff 14 dc callq *(%r12,%rbx,8)
- 40052d: 48 83 c3 01 add $0x1,%rbx
- 400531: 48 39 eb cmp %rbp,%rbx
- 400534: 72 ea jb 400520 <__libc_csu_init+0x50>
- 400536: 48 8b 5c 24 08 mov 0x8(%rsp),%rbx
- 40053b: 48 8b 6c 24 10 mov 0x10(%rsp),%rbp
- 400540: 4c 8b 64 24 18 mov 0x18(%rsp),%r12
- 400545: 4c 8b 6c 24 20 mov 0x20(%rsp),%r13
- 40054a: 4c 8b 74 24 28 mov 0x28(%rsp),%r14
- 40054f: 4c 8b 7c 24 30 mov 0x30(%rsp),%r15
- 400554: 48 83 c4 38 add $0x38,%rsp
- 400558: c3 retq
- 400559: 90 nop
- 40055a: 90 nop
- 40055b: 90 nop
- 40055c: 90 nop
- 40055d: 90 nop
- 40055e: 90 nop
- 40055f: 90 nop
- 0000000000400560 <__do_global_ctors_aux>:
- 400560: 55 push %rbp
- 400561: 48 89 e5 mov %rsp,%rbp
- 400564: 53 push %rbx
- 400565: 48 83 ec 08 sub $0x8,%rsp
- 400569: 48 8b 05 18 01 20 00 mov 0x200118(%rip),%rax # 600688 <__CTOR_LIST__>
- 400570: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
- 400574: 74 19 je 40058f <__do_global_ctors_aux+0x2f>
- 400576: bb 88 06 60 00 mov $0x600688,%ebx
- 40057b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
- 400580: 48 83 eb 08 sub $0x8,%rbx
- 400584: ff d0 callq *%rax
- 400586: 48 8b 03 mov (%rbx),%rax
- 400589: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
- 40058d: 75 f1 jne 400580 <__do_global_ctors_aux+0x20>
- 40058f: 48 83 c4 08 add $0x8,%rsp
- 400593: 5b pop %rbx
- 400594: c9 leaveq
- 400595: c3 retq
- 400596: 90 nop
- 400597: 90 nop
- Disassembly of section .fini:
- 0000000000400598 <_fini>:
- 400598: 48 83 ec 08 sub $0x8,%rsp
- 40059c: e8 3f fe ff ff callq 4003e0 <__do_global_dtors_aux>
- 4005a1: 48 83 c4 08 add $0x8,%rsp
- 4005a5: c3 retq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement