保护模式内核代码赏析
计算当前内核被加载的地址
leal (BP_scratch+4)(%esi), %esp
call 1f
1: popl %ebp
subl $ rva(1b), %ebp(0) Breakpoint 2, 0x0000000000100000 in ?? ()
Next at t=90656425
(0) [0x0000000000100000] 0010:0000000000100000 (unk. ctxt): cld ; fc
<bochs:7> u /10
00100000: ( ): cld ; fc
00100001: ( ): cli ; fa
00100002: ( ): lea esp, dword ptr ds:[esi+488] ; 8da6e8010000
00100008: ( ): call .+0 ; e800000000
0010000d: ( ): pop ebp ; 5d
0010000e: ( ): sub ebp, 0x0000000d ; 83ed0d切换GDT
计算解压缩内核用的地址
直接从startup_64开始debug
移动压缩内核
Last updated