windows - PE header 和 LARGEADDRESSAWARE 未针对 DLL 模块进行评估?

标签 windows dll portable-executable virtual-address-space

在 PE header 中有一个标志指示二进制文件是否为 LargeAddressAware。
PE header 本身存在于 *.exe 和 *.dll 中。

Windows 操作系统真的只为父可执行文件评估此标志吗?
是否对所有 DLL 模块完全忽略?

那么,如果没有人评估它,我为什么要为 DLL 启用 LAA 链接器标志?

我的想法是:
如果启用 LAA 的 exe 加载未编译为 LAA 的模块,是否有办法强制 Windows 发出警告?

另见相关问题:Drawbacks of using /LARGEADDRESSAWARE for 32 bit Windows executables?

最佳答案

Is it really the case that Windows OS evaluates this flag for the parent executable, only?

是的。

Is it completely ignored for all DLL modules?

是的。

So why should i enable the LAA linker flag for DLLs if nobody is evaluating it?

你不应该。这样做毫无意义。

I was having the following in mind: Is there a way to force Windows issue a warning in case a LAA enabled exe loads a module that is not compiled as being LAA?

不,没有。


问题是堆是进程范围的。它由所有模块共享。您不能让一些使用 LAA 堆而另一些不使用。所以只有可执行文件才有机会做出这个决定。该标志采用 DLL 和 EXE 通用的 PE 文件格式。但它只对 EXE 有意义。

关于windows - PE header 和 LARGEADDRESSAWARE 未针对 DLL 模块进行评估?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23034803/

相关文章:

python - 卸载通过 cx_freeze bdist_msi 创建的先前安装的 msi

c++ - 如何在默认桌面和 Winlogon 桌面之间切换进程?

c++ - 使用 dll 库时,是否需要包含用于构建 dll 的所有头文件?

delphi - 如何配置 FastMM 来检测 dll 中的内存泄漏

c++ - 如何防止特定的 DLL 加载到我的进程中

c# - 直接向U盘写入字节

c++ - 无法获取ms _tzSet()示例进行编译

windows - .rdata 和 .idata 段有什么区别?

windows - EXE header 中的奇怪值

windows - 生成PE格式的可执行文件