IA-32 中的段选择器 [英] Segment Selector in IA-32

查看:15
本文介绍了IA-32 中的段选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

段选择器何时出现.英特尔指南中的行说:

When does segment selector comes in picture. The line in Intel Guide says:

"每个段描述符都有一个关联的段选择器.一个段选择器为使用它的软件提供 GDT 的索引或 LDT(其关联的段描述符的偏移量),a全局/本地标志(确定选择器是否指向 GDT或 LDT),以及访问权限信息."

"Each segment descriptor has an associated segment selector. A segment selector provides the software that uses it with an index into the GDT or LDT (the offset of its associated segment descriptor), a global/local flag (determines whether the selector points to the GDT or the LDT), and access rights information."

我不太明白.

是否有单独的段选择器寄存器?它是如何计算的?为什么我们需要它?

Are there separate segment selector register(s)? How is it calculated? Why we need it.?

推荐答案

那么会发生什么:

每当加载程序时,链接加载程序都会使用适当的选择器加载段寄存器".
段寄存器(例如 CS、DS、SS 等)分为两部分:可见和隐藏.
它是加载器以适当的值加载的可见部分.
此值是 GDT 或 LDT 中的索引,具体取决于选择器的 TI 标志.
处理器自己加载隐藏部分.隐藏部分的信息是线性地址空间中的段基地址、段限制、访问信息.

Whenever a program is loaded, the linking loader loads the "Segment Registers" with the appropriate selectors.
A Segment Register ( e.g. CS, DS, SS, etc) is divided in two parts: Visible and Hidden.
It is the visible part which is loaded by the loader with the appropriate value.
This value is an index in GDT or LDT, depending on the TI flag of the selector.
The processor loads the hidden part by itself. The information in hidden part is the segment base address in the linear address space, segment limit, access information.

这篇关于IA-32 中的段选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆