SHARE
TWEET

Untitled

a guest Apr 14th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. file vmlinux
  2. load
  3. set $r0 = 0
  4. set $r1 = 0
  5. set $r2 = 0
  6. set $r3 = 0
  7. set $r4 = 0
  8. set $r5 = 0
  9. set $r6 = 0
  10. set $r7 = 0
  11. set $r8 = 0
  12. set $r9 = 0
  13. set $r10 = 0
  14. set $r11 = 0
  15. set $r12 = 0
  16. set $r13 = 0
  17. set $r14 = 0
  18. set $r15 = 0
  19. set $r16 = 0
  20. set $r17 = 0
  21. set $r18 = 0
  22. set $r19 = 0
  23. set $r20 = 0
  24. set $r21 = 0
  25. set $r22 = 0
  26. set $r23 = 0
  27. set $r24 = 0
  28. set $r25 = 0
  29. set $r26 = 0
  30. set $r27 = 0
  31. set $r28 = 0
  32. set $r29 = 0
  33. set $r30 = 0
  34. set $r31 = 0
  35. set $sr = 0
  36. break *0x00000110
  37. break *0x0043a20c
  38. break *0x0043a088
  39. break *0x0043a0b0
  40. break *0x0043a0f0
  41. break *0x0043a104
  42. break *0x0043a118
  43. break *0x0043a15c
  44. break *0x0043a188
  45. jump *0x100
  46.  
  47.  
  48. kernel jumps to the _start function in head.S file
  49. .
  50. .
  51. .
  52. ... I kept continuing until the jump to or32_early_setup at the end of _start function
  53.  
  54. c0440a20 T setup_cpuinfo
  55. c0440d74 T or32_early_setup
  56. c0440de0 T detect_unit_config
  57.  
  58.  
  59. (gdb) disas 0x0043a188-0x20, +0x40
  60. Dump of assembler code from 0x43a168 to 0x43a1a8:
  61.    0x0043a168:    l.ori r4,r4,0xfeed
  62.    0x0043a16c:    l.sfeq r3,r4
  63.    0x0043a170:    l.bf 0x43a17c
  64.    0x0043a174:    l.nop 0x0
  65.    0x0043a178:    l.or r25,r0,r0
  66.    0x0043a17c:    l.or r3,r0,r25
  67.    0x0043a180:    l.movhi r24,0xc044
  68.    0x0043a184:    l.ori r24,r24,0xd74
  69. => 0x0043a188:    l.jalr r24
  70.    0x0043a18c:    l.nop 0x0
  71.    0x0043a190:    l.movhi r2,0x0
  72.    0x0043a194:    l.movhi r3,0x0
  73.    0x0043a198:    l.movhi r4,0x0
  74.    0x0043a19c:    l.movhi r5,0x0
  75.    0x0043a1a0:    l.movhi r6,0x0
  76.    0x0043a1a4:    l.movhi r7,0x0
  77. End of assembler dump.
  78.  
  79. End of assembler dump.
  80. (gdb) si
  81. 0x0043a18c in ?? ()
  82. (gdb) info registers
  83. r0             0x0                 0
  84. r1             0xc041e000          0xc041e000 <mmlist_lock>
  85. r2             0x0                 0x0
  86. r3             0x0                 0
  87. r4             0xd00dfeed          -804389139
  88. r5             0x400               1024
  89. r6             0x8009              32777
  90. r7             0x0                 0
  91. r8             0x0                 0
  92. r9             0x43a190            0x43a190
  93. r10            0xc041c000          -1069432832
  94. r11            0x0                 0
  95. r12            0x0                 0
  96. r13            0x0                 0
  97. r14            0x10                16
  98. r15            0x0                 0
  99. r16            0x40                64
  100. r17            0x0                 0
  101. r18            0x0                 0
  102. r19            0x0                 0
  103. r20            0x0                 0
  104. r21            0x0                 0
  105. r22            0x0                 0
  106. ---Type <return> to continue, or q <return> to quit---
  107. r23            0x0                 0
  108. r24            0xc0440d74          -1069281932
  109. r25            0x0                 0
  110. r26            0x30                48
  111. r27            0x0                 0
  112. r28            0x60                96
  113. r29            0x0                 0
  114. r30            0xa069              41065
  115. r31            0x41c000            4308992
  116. ppc            0x43a188            0x43a188
  117. npc            0x43a18c            0x43a18c
  118. sr             0x8009              [ SM DCE FO CID=0 ]
  119.  
  120. ------------------------
  121. (gdb) disas 0xc0440d74  
  122. Dump of assembler code for function or32_early_setup:
  123.    0xc0440d74 <+0>:    l.mtspr r3,r1,0x574
  124.    0xc0440d78 <+4>:    l.mtspr r3,r1,0x574
  125.    0xc0440d7c <+8>:    l.mtspr r3,r1,0x574
  126.    0xc0440d80 <+12>:    l.mtspr r3,r1,0x574
  127.    0xc0440d84 <+16>:    l.mtspr r3,r1,0x574
  128.    0xc0440d88 <+20>:    l.mtspr r3,r1,0x574
  129.    0xc0440d8c <+24>:    l.mtspr r3,r1,0x574
  130.    0xc0440d90 <+28>:    l.mtspr r3,r1,0x574
  131.    0xc0440d94 <+32>:    l.mtspr r3,r1,0x574
  132.    0xc0440d98 <+36>:    l.mtspr r3,r1,0x574
  133.    0xc0440d9c <+40>:    l.mtspr r3,r1,0x574
  134.    0xc0440da0 <+44>:    l.mtspr r3,r1,0x574
  135.    0xc0440da4 <+48>:    l.mtspr r3,r1,0x574
  136.    0xc0440da8 <+52>:    l.mtspr r3,r1,0x574
  137.    0xc0440dac <+56>:    l.mtspr r3,r1,0x574
  138.    0xc0440db0 <+60>:    l.mtspr r3,r1,0x574
  139.    0xc0440db4 <+64>:    l.mtspr r3,r1,0x574
  140.    0xc0440db8 <+68>:    l.mtspr r3,r1,0x574
  141.    0xc0440dbc <+72>:    l.mtspr r3,r1,0x574
  142.    0xc0440dc0 <+76>:    l.mtspr r3,r1,0x574
  143.    0xc0440dc4 <+80>:    l.mtspr r3,r1,0x574
  144.    0xc0440dc8 <+84>:    l.mtspr r3,r1,0x574
  145. ---Type <return> to continue, or q <return> to quit---q
  146. Quit
  147. (gdb) disas 0x440d74, +0x20
  148. Dump of assembler code from 0x440d74 to 0x440d94:
  149.    0x00440d74:    l.sw -8(r1),r2
  150.    0x00440d78:    l.sw -4(r1),r9
  151.    0x00440d7c:    l.sw -12(r1),r16
  152.    0x00440d80:    l.ori r2,r1,0x0
  153.    0x00440d84:    l.sfeqi r3,0
  154.    0x00440d88:    l.bf 0x440dac
  155.    0x00440d8c:    l.addi r1,r1,-16
  156.    0x00440d90:    l.ori r16,r3,0x0
  157. End of assembler dump.
  158. (gdb) break *0x200
  159. Breakpoint 10 at 0x200
  160. (gdb) si
  161. 0xc0440d74 in or32_early_setup ()
  162. (gdb) si
  163.  
  164. Breakpoint 10, 0x00000200 in ?? ()
  165. (gdb) si
  166. 0x00000204 in ?? ()
  167. (gdb) si
  168. 0x00000208 in ?? ()
  169. (gdb) si
  170. 0x00000208 in ?? ()
  171. (gdb) si
  172. 0x0000020c in ?? ()
  173. (gdb) si
  174. 0x00000210 in ?? ()
  175. (gdb) si
  176. 0x00000214 in ?? ()
  177. (gdb) si
  178. 0x00000218 in ?? ()
  179. (gdb) si
  180. 0x0000021c in ?? ()
  181. (gdb) si
  182. 0x00000220 in ?? ()
  183. (gdb) si
  184. 0x00000224 in ?? ()
  185. (gdb) si
  186. 0x00000228 in ?? ()
  187. (gdb) si
  188. 0x0000022c in ?? ()
  189. (gdb) si
  190. 0x00000230 in ?? ()
  191. (gdb) c
  192. Continuing.
  193. ^C
  194. Program received signal SIGINT, Interrupt.
  195. 0xc0063108 in kmsg_dump_rewind_nolock ()
  196. (gdb) c
  197. Continuing.
  198. ^C
  199. Program received signal SIGINT, Interrupt.
  200. 0xc0063108 in kmsg_dump_rewind_nolock ()
  201. (gdb) c
  202. Continuing.
  203. ^C
  204. Program received signal SIGINT, Interrupt.
  205. 0xc0063104 in kmsg_dump_rewind_nolock ()
  206. (gdb) c
  207. Continuing.
  208. ^C
  209. Program received signal SIGINT, Interrupt.
  210. 0xc0063108 in kmsg_dump_rewind_nolock ()
  211. (gdb) c
  212. Continuing.
  213. ^C
  214. Program received signal SIGINT, Interrupt.
  215. 0xc0063104 in kmsg_dump_rewind_nolock ()
  216. (gdb) c
  217. Continuing.
  218. ^C
  219. Program received signal SIGINT, Interrupt.
  220. 0xc0063108 in kmsg_dump_rewind_nolock ()
  221. (gdb) c
  222. Continuing.
  223. ^C
  224. Program received signal SIGINT, Interrupt.
  225. 0xc0063108 in kmsg_dump_rewind_nolock ()
  226. (gdb) si
  227. 0xc0063108 in kmsg_dump_rewind_nolock ()
  228. (gdb) si
  229. 0xc0063108 in kmsg_dump_rewind_nolock ()
  230. (gdb) si
  231. 0xc0063108 in kmsg_dump_rewind_nolock ()
  232. (gdb) si
  233. 0xc0063108 in kmsg_dump_rewind_nolock ()
  234. (gdb)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top