【发布时间】:2012-06-23 02:45:06
【问题描述】:
我用谷歌搜索了一下并阅读了http://en.wikipedia.org/wiki/Portable_Executable,但我似乎找不到写入导入地址表地址的时间。编译时会发生吗?或者当可执行文件运行时?
【问题讨论】:
标签: windows file format portable-executable
我用谷歌搜索了一下并阅读了http://en.wikipedia.org/wiki/Portable_Executable,但我似乎找不到写入导入地址表地址的时间。编译时会发生吗?或者当可执行文件运行时?
【问题讨论】:
标签: windows file format portable-executable
它发生在运行时。阅读this。
【讨论】:
IAT 的全部意义在于允许在运行时将 PE 映像加载到地址空间中的任意位置。由于在运行时才知道基地址,因此无法在编译时填充 IAT。这意味着地址是在运行时将 PE 映像加载到内存中时设置的。
Matt Pietrek 关于 PE 格式的 MSJ columns 是很好的参考资料。
【讨论】: