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

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

问题描述

分段选择器何时出现在图片中.英特尔指南中的一行显示:

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

每个段描述符都有一个关联的段选择器.一个段 选择器提供了使用该软件并在GDT中建立索引的软件 或LDT(其关联的段描述符的偏移量), 全局/本地标志(确定选择器是否指向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天全站免登陆