Comment out 'PEDIR_EXCEPTION' check to accommodate .NET Core NativeAOT on x86 In .NET Core NativeAOT scenarios targeting x86, an exception directory is a normal feature. This line was causing an unnecessary --force requirement whenever an exception directory was present, which is standard for NativeAOT builds. Commenting out this check ensures that valid .NET Core NativeAOT executables aren’t mistakenly flagged for forced packing.
This commit is contained in:
parent
c2da21ba4e
commit
30fc69ecdf
@ -150,7 +150,9 @@ bool PackW32PeI386::needForceOption() const {
|
||||
r |= (ih.coffmagic != 0x10b); // COFF magic is 0x10B in PE files
|
||||
r |= (ih.entry == 0 && !isdll);
|
||||
r |= (ih.ddirsentries != 16);
|
||||
r |= (IDSIZE(PEDIR_EXCEPTION) != 0); // is this used on i386?
|
||||
// Explanation: For .NET Core NativeAOT on x86, an exception directory is expected.
|
||||
// Disabling this check prevents `--force` from being erroneously required.
|
||||
//// r |= (IDSIZE(PEDIR_EXCEPTION) != 0);
|
||||
//// r |= (IDSIZE(PEDIR_COPYRIGHT) != 0);
|
||||
return r;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user