COFF: Add a missing enum value for high entropy ASLR.

That bit is not documented in the PE/COFF spec published by Microsoft, so we
don't know the official name of it. I named this bit
IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS because the bit is
reported as "high entropy virtual address" by dumpbin.exe,

llvm-svn: 200121
This commit is contained in:
Rui Ueyama 2014-01-26 05:05:23 +00:00
parent aefaab640c
commit 9e8d26f03a
3 changed files with 5 additions and 0 deletions

View File

@ -531,6 +531,8 @@ namespace COFF {
};
enum DLLCharacteristics {
/// ASLR with 64 bit address space.
IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS = 0x0020,
/// DLL can be relocated at load time.
IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040,
/// Code integrity checks are enforced.

View File

@ -37,6 +37,7 @@ CHECK: SizeOfHeaders: 512
CHECK: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
CHECK: Subsystem [ (0x8160)
CHECK: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40)
CHECK: IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS (0x20)
CHECK: IMAGE_DLL_CHARACTERISTICS_NX_COMPAT (0x100)
CHECK: IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE (0x8000)
CHECK: ]

View File

@ -281,6 +281,8 @@ static const EnumEntry<COFF::WindowsSubsystem> PEWindowsSubsystem[] = {
};
static const EnumEntry<COFF::DLLCharacteristics> PEDLLCharacteristics[] = {
LLVM_READOBJ_ENUM_ENT(COFF,
IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE ),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY ),
LLVM_READOBJ_ENUM_ENT(COFF, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT ),