diff options
author | John Chen (CLR) <jochen@microsoft.com> | 2016-01-11 14:23:52 -0800 |
---|---|---|
committer | John Chen (CLR) <jochen@microsoft.com> | 2016-01-11 14:38:11 -0800 |
commit | f3541757ddffd46da02f90909922872a694de1fd (patch) | |
tree | afc36b03b6edb2d4b66872d61d8126b9781c1a56 /src/inc/corcompile.h | |
parent | db743bc4103e78484bd0dac54a1b887da63a7059 (diff) | |
download | coreclr-f3541757ddffd46da02f90909922872a694de1fd.tar.gz coreclr-f3541757ddffd46da02f90909922872a694de1fd.tar.bz2 coreclr-f3541757ddffd46da02f90909922872a694de1fd.zip |
Make CORCOMPILE_HEADER backward compatible
Resolve issue #2348 by reordering fields in CORCOMPILE_HEADER,
so that PEKind and Machines fields are in the same location as
in older versions of this struct.
Diffstat (limited to 'src/inc/corcompile.h')
-rw-r--r-- | src/inc/corcompile.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h index 4576990e9e..59bf865a34 100644 --- a/src/inc/corcompile.h +++ b/src/inc/corcompile.h @@ -249,7 +249,9 @@ enum CorCompileHeaderFlags struct CORCOMPILE_HEADER { // For backward compatibility reasons, VersionInfo field must be at offset 40, ManifestMetaData - // must be at 88, size of CORCOMPILE_HEADER must be 164/168 bytes. Be careful when you modify this struct. See code:PEDecoder::GetMetaDataHelper. + // must be at 88, PEKind must be at 112/116 bytes, Machine must be at 120/124 bytes, and + // size of CORCOMPILE_HEADER must be 164/168 bytes. Be careful when you modify this struct. + // See code:PEDecoder::GetMetaDataHelper. DWORD Signature; USHORT MajorVersion; USHORT MinorVersion; @@ -274,7 +276,6 @@ struct CORCOMPILE_HEADER // training data. They can also be used to have better nidump support for // decoding virtual section information ( start - end ranges for each // virtual section ) - IMAGE_DATA_DIRECTORY EEInfoTable; // points to a code:CORCOMPILE_EE_INFO_TABLE TADDR ImageBase; // Actual image base address (ASLR fakes the image base in PE header while applying relocations in kernel) DWORD Flags; // Flags, see CorCompileHeaderFlags above @@ -285,6 +286,8 @@ struct CORCOMPILE_HEADER WORD Machine; // Cached value of _IMAGE_FILE_HEADER.Machine from original IL image WORD Characteristics;// Cached value of _IMAGE_FILE_HEADER.Characteristics from original IL image + IMAGE_DATA_DIRECTORY EEInfoTable; // points to a code:CORCOMPILE_EE_INFO_TABLE + // For backward compatibility (see above) IMAGE_DATA_DIRECTORY Dummy1; IMAGE_DATA_DIRECTORY Dummy2; |