标签:内核 char ddl ase base add off ror res
在分析linux中的set_base之前,我们定义 ;eax is TSS0 offset address ;ebx is kernel_base address 0x10000 ;ecx is gdt_address ;edi is TSS0_SEL 0x20 set_base: addl %ebx, %eax ; eax = eax + ebx = 0x10000 + TSS0 offset address addl %ecx, %edi ; edi = edi + ecx = gdt_address + TSS0_SEL movw %ax, 2(%edi) ; *(shou*)((char*)edi + 2) = eax的低位 rorl $16, %eax ; 将eax的高低16位颠倒 movb %al, 4(%edi) movb %ah, 7(%edi) rorl $16, %eax ret标签:内核 char ddl ase base add off ror res
原文地址:http://www.cnblogs.com/sudochen/p/6923272.html