hello_puts.dis 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. hello_puts: file format elf64-littleriscv
  2. Disassembly of section .plt:
  3. 0000000000000570 <.plt>:
  4. 570: 00002397 auipc t2,0x2
  5. 574: 41c30333 sub t1,t1,t3
  6. 578: a983be03 ld t3,-1384(t2) # 2008 <__TMC_END__>
  7. 57c: fd430313 addi t1,t1,-44
  8. 580: a9838293 addi t0,t2,-1384
  9. 584: 00135313 srli t1,t1,0x1
  10. 588: 0082b283 ld t0,8(t0)
  11. 58c: 000e0067 jr t3
  12. 0000000000000590 <__libc_start_main@plt>:
  13. 590: 00002e17 auipc t3,0x2
  14. 594: a88e3e03 ld t3,-1400(t3) # 2018 <__libc_start_main@GLIBC_2.34>
  15. 598: 000e0367 jalr t1,t3
  16. 59c: 00000013 nop
  17. 00000000000005a0 <puts@plt>:
  18. 5a0: 00002e17 auipc t3,0x2
  19. 5a4: a80e3e03 ld t3,-1408(t3) # 2020 <puts@GLIBC_2.27>
  20. 5a8: 000e0367 jalr t1,t3
  21. 5ac: 00000013 nop
  22. Disassembly of section .text:
  23. 00000000000005b0 <_start>:
  24. 5b0: 022000ef jal ra,5d2 <load_gp>
  25. 5b4: 87aa mv a5,a0
  26. 5b6: 00002517 auipc a0,0x2
  27. 5ba: a8253503 ld a0,-1406(a0) # 2038 <_GLOBAL_OFFSET_TABLE_+0x10>
  28. 5be: 6582 ld a1,0(sp)
  29. 5c0: 0030 addi a2,sp,8
  30. 5c2: ff017113 andi sp,sp,-16
  31. 5c6: 4681 li a3,0
  32. 5c8: 4701 li a4,0
  33. 5ca: 880a mv a6,sp
  34. 5cc: fc5ff0ef jal ra,590 <__libc_start_main@plt>
  35. 5d0: 9002 ebreak
  36. 00000000000005d2 <load_gp>:
  37. 5d2: 00002197 auipc gp,0x2
  38. 5d6: 22e18193 addi gp,gp,558 # 2800 <__global_pointer$>
  39. 5da: 8082 ret
  40. ...
  41. 00000000000005de <deregister_tm_clones>:
  42. 5de: 00002517 auipc a0,0x2
  43. 5e2: a2a50513 addi a0,a0,-1494 # 2008 <__TMC_END__>
  44. 5e6: 00002797 auipc a5,0x2
  45. 5ea: a2278793 addi a5,a5,-1502 # 2008 <__TMC_END__>
  46. 5ee: 00a78863 beq a5,a0,5fe <deregister_tm_clones+0x20>
  47. 5f2: 00002797 auipc a5,0x2
  48. 5f6: a3e7b783 ld a5,-1474(a5) # 2030 <_ITM_deregisterTMCloneTable@Base>
  49. 5fa: c391 beqz a5,5fe <deregister_tm_clones+0x20>
  50. 5fc: 8782 jr a5
  51. 5fe: 8082 ret
  52. 0000000000000600 <register_tm_clones>:
  53. 600: 00002517 auipc a0,0x2
  54. 604: a0850513 addi a0,a0,-1528 # 2008 <__TMC_END__>
  55. 608: 00002597 auipc a1,0x2
  56. 60c: a0058593 addi a1,a1,-1536 # 2008 <__TMC_END__>
  57. 610: 8d89 sub a1,a1,a0
  58. 612: 4035d793 srai a5,a1,0x3
  59. 616: 91fd srli a1,a1,0x3f
  60. 618: 95be add a1,a1,a5
  61. 61a: 8585 srai a1,a1,0x1
  62. 61c: c599 beqz a1,62a <register_tm_clones+0x2a>
  63. 61e: 00002797 auipc a5,0x2
  64. 622: a2a7b783 ld a5,-1494(a5) # 2048 <_ITM_registerTMCloneTable@Base>
  65. 626: c391 beqz a5,62a <register_tm_clones+0x2a>
  66. 628: 8782 jr a5
  67. 62a: 8082 ret
  68. 000000000000062c <__do_global_dtors_aux>:
  69. 62c: 1141 addi sp,sp,-16
  70. 62e: e022 sd s0,0(sp)
  71. 630: 00002417 auipc s0,0x2
  72. 634: a2040413 addi s0,s0,-1504 # 2050 <completed.0>
  73. 638: 00044783 lbu a5,0(s0)
  74. 63c: e406 sd ra,8(sp)
  75. 63e: e385 bnez a5,65e <__do_global_dtors_aux+0x32>
  76. 640: 00002797 auipc a5,0x2
  77. 644: a007b783 ld a5,-1536(a5) # 2040 <__cxa_finalize@GLIBC_2.27>
  78. 648: c791 beqz a5,654 <__do_global_dtors_aux+0x28>
  79. 64a: 00002517 auipc a0,0x2
  80. 64e: 9b653503 ld a0,-1610(a0) # 2000 <__dso_handle>
  81. 652: 9782 jalr a5
  82. 654: f8bff0ef jal ra,5de <deregister_tm_clones>
  83. 658: 4785 li a5,1
  84. 65a: 00f40023 sb a5,0(s0)
  85. 65e: 60a2 ld ra,8(sp)
  86. 660: 6402 ld s0,0(sp)
  87. 662: 0141 addi sp,sp,16
  88. 664: 8082 ret
  89. 0000000000000666 <frame_dummy>:
  90. 666: bf69 j 600 <register_tm_clones>
  91. 0000000000000668 <main>:
  92. #include <stdio.h>
  93. int main()
  94. {
  95. 668: ff010113 addi sp,sp,-16
  96. 66c: 00113423 sd ra,8(sp)
  97. 670: 00813023 sd s0,0(sp)
  98. 674: 01010413 addi s0,sp,16
  99. puts("test\n");
  100. 678: 00000517 auipc a0,0x0
  101. 67c: 03050513 addi a0,a0,48 # 6a8 <_IO_stdin_used+0x8>
  102. 680: f21ff0ef jal ra,5a0 <puts@plt>
  103. return 0;
  104. 684: 00000793 li a5,0
  105. }
  106. 688: 00078513 mv a0,a5
  107. 68c: 00813083 ld ra,8(sp)
  108. 690: 00013403 ld s0,0(sp)
  109. 694: 01010113 addi sp,sp,16
  110. 698: 00008067 ret