Fix 32 bit crossgen tests.
This commit is contained in:
parent
b567bc82c3
commit
25b1f627c2
1 changed files with 2 additions and 1 deletions
|
@ -13,12 +13,13 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
{
|
{
|
||||||
public static bool IsCrossgened(this PEReader peReader)
|
public static bool IsCrossgened(this PEReader peReader)
|
||||||
{
|
{
|
||||||
|
const int CROSSGEN_FLAG = 4;
|
||||||
bool isCrossgened = false;
|
bool isCrossgened = false;
|
||||||
|
|
||||||
if (peReader.HasMetadata)
|
if (peReader.HasMetadata)
|
||||||
{
|
{
|
||||||
// 4 is the magic numbers that is set in the CLR header's flags when crossgened.
|
// 4 is the magic numbers that is set in the CLR header's flags when crossgened.
|
||||||
isCrossgened = (int)peReader.PEHeaders.CorHeader.Flags == 4;
|
isCrossgened = ((int)peReader.PEHeaders.CorHeader.Flags & CROSSGEN_FLAG) == CROSSGEN_FLAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
return isCrossgened;
|
return isCrossgened;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue