Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: syzygy/pe/pe_structs.h

Issue 2771503005: Add support for the Win10 SDK to the PE reader (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « syzygy/pe/pe_file_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/pe/pe_structs.h
diff --git a/syzygy/pe/pe_structs.h b/syzygy/pe/pe_structs.h
index 0fe86226ad9ba850688bada0372abb50e5323ea0..1b2a22e31d60ee2e6caaf196d1c19acb480e1a18 100644
--- a/syzygy/pe/pe_structs.h
+++ b/syzygy/pe/pe_structs.h
@@ -21,8 +21,18 @@
namespace pe {
+// Redefinition of the IMAGE_LOAD_CONFIG_CODE_INTEGRITY structure. This
+// corresponds to the structure as encountered in the version 10.0+ of the
+// Windows SDK.
+struct IMAGE_LOAD_CONFIG_CODE_INTEGRITY {
+ WORD Flags;
+ WORD Catalog;
+ DWORD CatalogOffset;
+ DWORD Reserved;
+};
+
// Redefinition of the IMAGE_LOAD_CONFIG_DIRECTORY structure. This corresponds
-// to the structure as encountered in the version 8.1 of the Windows SDK.
+// to the structure as encountered in the version 10.0.14393 of the Windows SDK.
struct LoadConfigDirectory {
// Fields available in v8.0+ of the Windows SDK.
DWORD Size;
@@ -52,15 +62,36 @@ struct LoadConfigDirectory {
DWORD GuardCFFunctionTable; // VA
DWORD GuardCFFunctionCount;
DWORD GuardFlags;
+
+ // Fields available in v10.0+ of the Windows SDK.
+ IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity;
+ DWORD GuardAddressTakenIatEntryTable; // VA
+ DWORD GuardAddressTakenIatEntryCount;
+ DWORD GuardLongJumpTargetTable; // VA
+ DWORD GuardLongJumpTargetCount;
+ DWORD DynamicValueRelocTable; // VA
+ DWORD HybridMetadataPointer;
};
-// An enum mapping the size of a given IMAGE_LOAD_CONFIG_DIRECTORY structure to
-// the corresponding version of the Windows SDK.
+// An enum mapping the size of a given IMAGE_LOAD_CONFIG_DIRECTORY structure
+// to the corresponding version of the Windows SDK.
enum LoadConfigDirectoryVersion {
kLoadConfigDirectorySizeUnknown = 0,
+ // Corresponds to the version 8.0 of the Windows SDK.
kLoadConfigDirectorySize80 =
offsetof(LoadConfigDirectory, GuardCFCheckFunctionPointer),
- kLoadConfigDirectorySize81 = sizeof(LoadConfigDirectory),
+ // Corresponds to the version 8.1+ of the Windows SDK.
+ kLoadConfigDirectorySize81 = offsetof(LoadConfigDirectory, CodeIntegrity),
+ // Corresponds to the version 10.0+ of the Windows SDK with the code integrity
+ // feature disabled.
+ kLoadConfigDirectorySize100NoCodeIntegrity =
+ offsetof(LoadConfigDirectory, CodeIntegrity),
+ // Corresponds to the version 10.0+ of the Windows SDK with the CFG feature
+ // disabled.
+ kLoadConfigDirectorySize100NoCFG =
+ offsetof(LoadConfigDirectory, GuardAddressTakenIatEntryTable),
+ // Corresponds to the full version 10.0 of the Windows SDK.
+ kLoadConfigDirectorySize100 = sizeof(LoadConfigDirectory),
};
}; // namespace pe
« no previous file with comments | « syzygy/pe/pe_file_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698