Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.19 KB | None | 0 0
  1. test: file format elf64-x86-64
  2.  
  3.  
  4. Disassembly of section .init:
  5.  
  6. 0000000000400358 <_init>:
  7. 400358: 48 83 ec 08 sub $0x8,%rsp
  8. 40035c: e8 5b 00 00 00 callq 4003bc <call_gmon_start>
  9. 400361: e8 ea 00 00 00 callq 400450 <frame_dummy>
  10. 400366: e8 f5 01 00 00 callq 400560 <__do_global_ctors_aux>
  11. 40036b: 48 83 c4 08 add $0x8,%rsp
  12. 40036f: c3 retq
  13.  
  14. Disassembly of section .plt:
  15.  
  16. 0000000000400370 <__libc_start_main@plt-0x10>:
  17. 400370: ff 35 da 04 20 00 pushq 0x2004da(%rip) # 600850 <_GLOBAL_OFFSET_TABLE_+0x8>
  18. 400376: ff 25 dc 04 20 00 jmpq *0x2004dc(%rip) # 600858 <_GLOBAL_OFFSET_TABLE_+0x10>
  19. 40037c: 0f 1f 40 00 nopl 0x0(%rax)
  20.  
  21. 0000000000400380 <__libc_start_main@plt>:
  22. 400380: ff 25 da 04 20 00 jmpq *0x2004da(%rip) # 600860 <_GLOBAL_OFFSET_TABLE_+0x18>
  23. 400386: 68 00 00 00 00 pushq $0x0
  24. 40038b: e9 e0 ff ff ff jmpq 400370 <_init+0x18>
  25.  
  26. Disassembly of section .text:
  27.  
  28. 0000000000400390 <_start>:
  29. 400390: 31 ed xor %ebp,%ebp
  30. 400392: 49 89 d1 mov %rdx,%r9
  31. 400395: 5e pop %rsi
  32. 400396: 48 89 e2 mov %rsp,%rdx
  33. 400399: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
  34. 40039d: 50 push %rax
  35. 40039e: 54 push %rsp
  36. 40039f: 49 c7 c0 c0 04 40 00 mov $0x4004c0,%r8
  37. 4003a6: 48 c7 c1 d0 04 40 00 mov $0x4004d0,%rcx
  38. 4003ad: 48 c7 c7 80 04 40 00 mov $0x400480,%rdi
  39. 4003b4: e8 c7 ff ff ff callq 400380 <__libc_start_main@plt>
  40. 4003b9: f4 hlt
  41. 4003ba: 90 nop
  42. 4003bb: 90 nop
  43.  
  44. 00000000004003bc <call_gmon_start>:
  45. 4003bc: 48 83 ec 08 sub $0x8,%rsp
  46. 4003c0: 48 8b 05 79 04 20 00 mov 0x200479(%rip),%rax # 600840 <_DYNAMIC+0x190>
  47. 4003c7: 48 85 c0 test %rax,%rax
  48. 4003ca: 74 02 je 4003ce <call_gmon_start+0x12>
  49. 4003cc: ff d0 callq *%rax
  50. 4003ce: 48 83 c4 08 add $0x8,%rsp
  51. 4003d2: c3 retq
  52. 4003d3: 90 nop
  53. 4003d4: 90 nop
  54. 4003d5: 90 nop
  55. 4003d6: 90 nop
  56. 4003d7: 90 nop
  57. 4003d8: 90 nop
  58. 4003d9: 90 nop
  59. 4003da: 90 nop
  60. 4003db: 90 nop
  61. 4003dc: 90 nop
  62. 4003dd: 90 nop
  63. 4003de: 90 nop
  64. 4003df: 90 nop
  65.  
  66. 00000000004003e0 <__do_global_dtors_aux>:
  67. 4003e0: 55 push %rbp
  68. 4003e1: 48 89 e5 mov %rsp,%rbp
  69. 4003e4: 53 push %rbx
  70. 4003e5: 48 83 ec 08 sub $0x8,%rsp
  71. 4003e9: 80 3d 80 04 20 00 00 cmpb $0x0,0x200480(%rip) # 600870 <completed.6349>
  72. 4003f0: 75 4b jne 40043d <__do_global_dtors_aux+0x5d>
  73. 4003f2: bb a0 06 60 00 mov $0x6006a0,%ebx
  74. 4003f7: 48 8b 05 7a 04 20 00 mov 0x20047a(%rip),%rax # 600878 <dtor_idx.6351>
  75. 4003fe: 48 81 eb 98 06 60 00 sub $0x600698,%rbx
  76. 400405: 48 c1 fb 03 sar $0x3,%rbx
  77. 400409: 48 83 eb 01 sub $0x1,%rbx
  78. 40040d: 48 39 d8 cmp %rbx,%rax
  79. 400410: 73 24 jae 400436 <__do_global_dtors_aux+0x56>
  80. 400412: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
  81. 400418: 48 83 c0 01 add $0x1,%rax
  82. 40041c: 48 89 05 55 04 20 00 mov %rax,0x200455(%rip) # 600878 <dtor_idx.6351>
  83. 400423: ff 14 c5 98 06 60 00 callq *0x600698(,%rax,8)
  84. 40042a: 48 8b 05 47 04 20 00 mov 0x200447(%rip),%rax # 600878 <dtor_idx.6351>
  85. 400431: 48 39 d8 cmp %rbx,%rax
  86. 400434: 72 e2 jb 400418 <__do_global_dtors_aux+0x38>
  87. 400436: c6 05 33 04 20 00 01 movb $0x1,0x200433(%rip) # 600870 <completed.6349>
  88. 40043d: 48 83 c4 08 add $0x8,%rsp
  89. 400441: 5b pop %rbx
  90. 400442: c9 leaveq
  91. 400443: c3 retq
  92. 400444: 66 66 66 2e 0f 1f 84 data32 data32 nopw %cs:0x0(%rax,%rax,1)
  93. 40044b: 00 00 00 00 00
  94.  
  95. 0000000000400450 <frame_dummy>:
  96. 400450: 48 83 3d 50 02 20 00 cmpq $0x0,0x200250(%rip) # 6006a8 <__JCR_END__>
  97. 400457: 00
  98. 400458: 55 push %rbp
  99. 400459: 48 89 e5 mov %rsp,%rbp
  100. 40045c: 74 12 je 400470 <frame_dummy+0x20>
  101. 40045e: b8 00 00 00 00 mov $0x0,%eax
  102. 400463: 48 85 c0 test %rax,%rax
  103. 400466: 74 08 je 400470 <frame_dummy+0x20>
  104. 400468: bf a8 06 60 00 mov $0x6006a8,%edi
  105. 40046d: c9 leaveq
  106. 40046e: ff e0 jmpq *%rax
  107. 400470: c9 leaveq
  108. 400471: c3 retq
  109. 400472: 90 nop
  110. 400473: 90 nop
  111.  
  112. 0000000000400474 <f>:
  113. int f(int i)
  114. {
  115. 400474: 55 push %rbp
  116. 400475: 48 89 e5 mov %rsp,%rbp
  117. 400478: 89 7d fc mov %edi,-0x4(%rbp)
  118. return i;
  119. 40047b: 8b 45 fc mov -0x4(%rbp),%eax
  120. }
  121. 40047e: c9 leaveq
  122. 40047f: c3 retq
  123.  
  124. 0000000000400480 <main>:
  125.  
  126. int main(int argC, char* argV[])
  127. {
  128. 400480: 55 push %rbp
  129. 400481: 48 89 e5 mov %rsp,%rbp
  130. 400484: 48 83 ec 20 sub $0x20,%rsp
  131. 400488: 89 7d ec mov %edi,-0x14(%rbp)
  132. 40048b: 48 89 75 e0 mov %rsi,-0x20(%rbp)
  133. int x = f(12);
  134. return 0;
  135. 40048f: 48 8d 84 24 08 d0 ff lea -0x2ff8(%rsp),%rax
  136. 400496: ff
  137. 400497: 48 c7 00 00 00 00 00 movq $0x0,(%rax)
  138. return i;
  139. }
  140.  
  141. int main(int argC, char* argV[])
  142. {
  143. int x = f(12);
  144. 40049e: bf 0c 00 00 00 mov $0xc,%edi
  145. 4004a3: e8 cc ff ff ff callq 400474 <f>
  146. 4004a8: 89 45 fc mov %eax,-0x4(%rbp)
  147. return 0;
  148. 4004ab: b8 00 00 00 00 mov $0x0,%eax
  149. }
  150. 4004b0: c9 leaveq
  151. 4004b1: c3 retq
  152. 4004b2: 90 nop
  153. 4004b3: 90 nop
  154. 4004b4: 90 nop
  155. 4004b5: 90 nop
  156. 4004b6: 90 nop
  157. 4004b7: 90 nop
  158. 4004b8: 90 nop
  159. 4004b9: 90 nop
  160. 4004ba: 90 nop
  161. 4004bb: 90 nop
  162. 4004bc: 90 nop
  163. 4004bd: 90 nop
  164. 4004be: 90 nop
  165. 4004bf: 90 nop
  166.  
  167. 00000000004004c0 <__libc_csu_fini>:
  168. 4004c0: f3 c3 repz retq
  169. 4004c2: 66 66 66 66 66 2e 0f data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1)
  170. 4004c9: 1f 84 00 00 00 00 00
  171.  
  172. 00000000004004d0 <__libc_csu_init>:
  173. 4004d0: 48 89 6c 24 d8 mov %rbp,-0x28(%rsp)
  174. 4004d5: 4c 89 64 24 e0 mov %r12,-0x20(%rsp)
  175. 4004da: 48 8d 2d a3 01 20 00 lea 0x2001a3(%rip),%rbp # 600684 <__init_array_end>
  176. 4004e1: 4c 8d 25 9c 01 20 00 lea 0x20019c(%rip),%r12 # 600684 <__init_array_end>
  177. 4004e8: 4c 89 6c 24 e8 mov %r13,-0x18(%rsp)
  178. 4004ed: 4c 89 74 24 f0 mov %r14,-0x10(%rsp)
  179. 4004f2: 4c 89 7c 24 f8 mov %r15,-0x8(%rsp)
  180. 4004f7: 48 89 5c 24 d0 mov %rbx,-0x30(%rsp)
  181. 4004fc: 48 83 ec 38 sub $0x38,%rsp
  182. 400500: 4c 29 e5 sub %r12,%rbp
  183. 400503: 41 89 fd mov %edi,%r13d
  184. 400506: 49 89 f6 mov %rsi,%r14
  185. 400509: 48 c1 fd 03 sar $0x3,%rbp
  186. 40050d: 49 89 d7 mov %rdx,%r15
  187. 400510: e8 43 fe ff ff callq 400358 <_init>
  188. 400515: 48 85 ed test %rbp,%rbp
  189. 400518: 74 1c je 400536 <__libc_csu_init+0x66>
  190. 40051a: 31 db xor %ebx,%ebx
  191. 40051c: 0f 1f 40 00 nopl 0x0(%rax)
  192. 400520: 4c 89 fa mov %r15,%rdx
  193. 400523: 4c 89 f6 mov %r14,%rsi
  194. 400526: 44 89 ef mov %r13d,%edi
  195. 400529: 41 ff 14 dc callq *(%r12,%rbx,8)
  196. 40052d: 48 83 c3 01 add $0x1,%rbx
  197. 400531: 48 39 eb cmp %rbp,%rbx
  198. 400534: 72 ea jb 400520 <__libc_csu_init+0x50>
  199. 400536: 48 8b 5c 24 08 mov 0x8(%rsp),%rbx
  200. 40053b: 48 8b 6c 24 10 mov 0x10(%rsp),%rbp
  201. 400540: 4c 8b 64 24 18 mov 0x18(%rsp),%r12
  202. 400545: 4c 8b 6c 24 20 mov 0x20(%rsp),%r13
  203. 40054a: 4c 8b 74 24 28 mov 0x28(%rsp),%r14
  204. 40054f: 4c 8b 7c 24 30 mov 0x30(%rsp),%r15
  205. 400554: 48 83 c4 38 add $0x38,%rsp
  206. 400558: c3 retq
  207. 400559: 90 nop
  208. 40055a: 90 nop
  209. 40055b: 90 nop
  210. 40055c: 90 nop
  211. 40055d: 90 nop
  212. 40055e: 90 nop
  213. 40055f: 90 nop
  214.  
  215. 0000000000400560 <__do_global_ctors_aux>:
  216. 400560: 55 push %rbp
  217. 400561: 48 89 e5 mov %rsp,%rbp
  218. 400564: 53 push %rbx
  219. 400565: 48 83 ec 08 sub $0x8,%rsp
  220. 400569: 48 8b 05 18 01 20 00 mov 0x200118(%rip),%rax # 600688 <__CTOR_LIST__>
  221. 400570: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
  222. 400574: 74 19 je 40058f <__do_global_ctors_aux+0x2f>
  223. 400576: bb 88 06 60 00 mov $0x600688,%ebx
  224. 40057b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
  225. 400580: 48 83 eb 08 sub $0x8,%rbx
  226. 400584: ff d0 callq *%rax
  227. 400586: 48 8b 03 mov (%rbx),%rax
  228. 400589: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
  229. 40058d: 75 f1 jne 400580 <__do_global_ctors_aux+0x20>
  230. 40058f: 48 83 c4 08 add $0x8,%rsp
  231. 400593: 5b pop %rbx
  232. 400594: c9 leaveq
  233. 400595: c3 retq
  234. 400596: 90 nop
  235. 400597: 90 nop
  236.  
  237. Disassembly of section .fini:
  238.  
  239. 0000000000400598 <_fini>:
  240. 400598: 48 83 ec 08 sub $0x8,%rsp
  241. 40059c: e8 3f fe ff ff callq 4003e0 <__do_global_dtors_aux>
  242. 4005a1: 48 83 c4 08 add $0x8,%rsp
  243. 4005a5: c3 retq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement