/HIGHENTROPYVA(支持 64 位 ASLR)/HIGHENTROPYVA (Support 64-Bit ASLR)

指定可执行映像是否支持高熵 64 位地址空间布局随机化 (ASLR)。Specifies whether the executable image supports high-entropy 64-bit address space layout randomization (ASLR).

语法Syntax

/HIGHENTROPYVA[: 否]/HIGHENTROPYVA[:NO]

备注Remarks

/HIGHENTROPYVA修改的标头可执行映像,.dll 文件或.exe 文件,以指示 ASLR 是否可以使用整个 64 位地址空间。/HIGHENTROPYVA modifies the header of an executable image, a .dll file or .exe file, to indicate whether ASLR can use the entire 64-bit address space. 当在可执行文件和所有依赖的模块上执行此选项时,支持 64 位 ASLR 的操作系统可在加载时通过使用 64 位虚拟地址空间来变基可执行映像。When this option is set on an executable and all of the modules that it depends on, an operating system that supports 64-bit ASLR can rebase the segments of the executable image at load time by using randomized addresses in a 64-bit virtual address space. 更大的地址空间使攻击者更难猜到特定内存区域的位置。This large address space makes it more difficult for an attacker to guess the location of a particular memory region.

默认情况下 /HIGHENTROPYVA启用为 64 位可执行映像。By default, /HIGHENTROPYVA is enabled for 64-bit executable images. 此选项需要/LARGEADDRESSAWARE,其中还启用了默认情况下为 64 位映像。This option requires /LARGEADDRESSAWARE, which is also enabled by default for 64-bit images. /HIGHENTROPYVA不是适用于 32 位可执行映像,其中链接器会忽略选项。/HIGHENTROPYVA is not applicable to 32-bit executable images, where the linker ignores the option. 若要显式禁用此选项,请使用 /highentropyva: noTo explicitly disable this option, use /HIGHENTROPYVA:NO.

有关 /HIGHENTROPYVA若要在加载时,会影响/DYNAMICBASE还必须启用。For /HIGHENTROPYVA to have an effect at load time, /DYNAMICBASE must also be enabled. /DYNAMICBASE默认情况下,启用,需要启用 Windows Vista 和更高版本操作系统中的 ASLR。/DYNAMICBASE is enabled by default, and is required to enable ASLR in Windows Vista and later operating systems. 早期 Windows 版本忽略此标志。Earlier versions of Windows ignore this flag.

在 Visual Studio 中设置此链接器选项To set this linker option in Visual Studio

  1. 打开项目“属性页” 对话框。Open the project Property Pages dialog box. 有关详细信息,请参阅使用项目属性For more information, see Working with Project Properties.

  2. 选择配置属性 > 链接器 > 命令行属性页。Select the Configuration Properties > Linker > Command Line property page.

  3. 在中其他选项,输入/HIGHENTROPYVA/HIGHENTROPYVA:NOIn Additional Options, enter /HIGHENTROPYVA or /HIGHENTROPYVA:NO.

请参阅See also