x86的符号表

来源:互联网 发布:windows无法输入中文 编辑:程序博客网 时间:2024/04/30 02:18

今天在看云计算的安全,有篇文章要用到IDT表,我知道IDT表是interrupt descriptor table.中断描述表。所有的系统中断都在里面,不过不知道这东西怎么用的。查了点资料。

The Interrupt Descriptor Table (IDT) is an array of 8 byte interrupt descriptors in memory devoted to specifying (at most) 256 interrupt service routines. The first 32 entries are reserved for processor exceptions, and any 16 of the remaining entries can be used for hardware interrupts. The rest are available for software interrupts.

IDT表有256个目录,前32个目录用于intel的硬件中断,剩余的用于软中断。

the struct of IDT entry is like:

 

struct IDTDescr{
   uint16 offset_1; // offset bits 0..15
   uint16 selector; // a code segment selector in GDT or LDT
   uint8 zero;      // unused, set to 0
   uint8 type_attr; // type and attributes, see below
   uint16 offset_2; // offset bits 16..31
};

 

其实关键的是selector,是要跳转的在GDT或LDT的地址,有了这个地址就可以取出内存中的代码了。

 

具体的我还有很多不懂,慢慢学习再来写。

原创粉丝点击