“相对虚拟地址”,相对于什么?

发布于 2024-12-11 10:57:29 字数 225 浏览 0 评论 0原文

我刚刚阅读了有关指令在磁盘文件中的偏移量、RVA 和 VA 一旦加载到内存中的信息。我还读到,如果将 PE 文件完全按照磁盘中的方式加载到内存中,则 RVA 将与文件偏移量相同(这种情况发生是非常不寻常的)。

我的疑问是——正常情况下,这些RVA是相对于什么而言的?那个特定的 PE 数据结构的开始?

编辑:我所说的PE数据结构是指-PE头、DOS头、DOS存根、PE文件头、图像可选头、节表和数据目录。

I have just been reading about the offsets of instructions which they are in a file on the disk, the RVA and the VA once they are loaded into the memory. I also read that if a PE file were loaded into the memory exactly as it were in the disk, the RVA would be same as the file offsets(and that it would be very unusual for that to happen).

My doubt is - under normal circumstances, what are these RVA's relative to? The start of that particular PE data structure?

Edit: by PE data structure I mean - PE header, DOS header, DOS stub, PE file header, Image optional header, Section table and Data directories.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

多彩岁月 2024-12-18 10:57:29

RVA 是加载到内存后相对于图像基地址的地址。

MS PE/COFF 规范指出:

相对虚拟地址。在图像文件中,项目加载到内存后的地址,减去图像文件的基地址。项目的 RVA 几乎总是与其在磁盘上文件中的位置(文件指针)不同。

RVA is the address relative to the image base address, after having been loaded into memory.

The MS PE/COFF specification says:

Relative virtual address. In an image file, the address of an item after it is loaded into memory, with the base address of the image file subtracted from it. The RVA of an item almost always differs from its position within the file on disk (file pointer).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文