diff --git a/llvm/include/llvm/Support/COFF.h b/llvm/include/llvm/Support/COFF.h index d9e239ec587f..fde545f00857 100644 --- a/llvm/include/llvm/Support/COFF.h +++ b/llvm/include/llvm/Support/COFF.h @@ -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. diff --git a/llvm/test/tools/llvm-readobj/peplus.test b/llvm/test/tools/llvm-readobj/peplus.test index 13c3f160055b..48e0e7f6e196 100644 --- a/llvm/test/tools/llvm-readobj/peplus.test +++ b/llvm/test/tools/llvm-readobj/peplus.test @@ -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: ] diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index 493396f2e281..dd6f3d6ba817 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -281,6 +281,8 @@ static const EnumEntry PEWindowsSubsystem[] = { }; static const EnumEntry 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 ),