зеркало из https://github.com/mono/ikvm-fork.git
Added ikvmc -highentropyva option (to enable high entropy ASLR in 64 bit processes on Windows 8).
This commit is contained in:
Родитель
25b6243ac7
Коммит
3a77554664
|
@ -347,6 +347,7 @@ class IkvmcCompiler
|
||||||
Console.Error.WriteLine(" -nostdlib Do not reference standard libraries");
|
Console.Error.WriteLine(" -nostdlib Do not reference standard libraries");
|
||||||
Console.Error.WriteLine(" -lib:<dir> Additional directories to search for references");
|
Console.Error.WriteLine(" -lib:<dir> Additional directories to search for references");
|
||||||
Console.Error.WriteLine(" -noautoserialization Disable automatic .NET serialization support");
|
Console.Error.WriteLine(" -noautoserialization Disable automatic .NET serialization support");
|
||||||
|
Console.Error.WriteLine(" -highentropyva Enable high entropy ASLR");
|
||||||
}
|
}
|
||||||
|
|
||||||
int ParseCommandLine(IEnumerator<string> arglist, List<CompilerOptions> targets, CompilerOptions options)
|
int ParseCommandLine(IEnumerator<string> arglist, List<CompilerOptions> targets, CompilerOptions options)
|
||||||
|
@ -803,6 +804,10 @@ class IkvmcCompiler
|
||||||
{
|
{
|
||||||
options.codegenoptions |= CodeGenOptions.NoAutomagicSerialization;
|
options.codegenoptions |= CodeGenOptions.NoAutomagicSerialization;
|
||||||
}
|
}
|
||||||
|
else if(s == "-highentropyva")
|
||||||
|
{
|
||||||
|
options.highentropyva = true;
|
||||||
|
}
|
||||||
else if(s.StartsWith("-writeSuppressWarningsFile:"))
|
else if(s.StartsWith("-writeSuppressWarningsFile:"))
|
||||||
{
|
{
|
||||||
options.writeSuppressWarningsFile = s.Substring(27);
|
options.writeSuppressWarningsFile = s.Substring(27);
|
||||||
|
|
|
@ -174,6 +174,10 @@ namespace IKVM.Internal
|
||||||
{
|
{
|
||||||
moduleBuilder.__FileAlignment = options.fileAlignment;
|
moduleBuilder.__FileAlignment = options.fileAlignment;
|
||||||
}
|
}
|
||||||
|
if(options.highentropyva)
|
||||||
|
{
|
||||||
|
moduleBuilder.__DllCharacteristics |= DllCharacteristics.HighEntropyVA;
|
||||||
|
}
|
||||||
return moduleBuilder;
|
return moduleBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3403,6 +3407,7 @@ namespace IKVM.Internal
|
||||||
internal ImageFileMachine imageFileMachine = ImageFileMachine.I386;
|
internal ImageFileMachine imageFileMachine = ImageFileMachine.I386;
|
||||||
internal long baseAddress;
|
internal long baseAddress;
|
||||||
internal int fileAlignment;
|
internal int fileAlignment;
|
||||||
|
internal bool highentropyva;
|
||||||
internal List<CompilerClassLoader> sharedclassloader; // should *not* be deep copied in Copy(), because we want the list of all compilers that share a class loader
|
internal List<CompilerClassLoader> sharedclassloader; // should *not* be deep copied in Copy(), because we want the list of all compilers that share a class loader
|
||||||
internal Dictionary<string, string> suppressWarnings = new Dictionary<string, string>();
|
internal Dictionary<string, string> suppressWarnings = new Dictionary<string, string>();
|
||||||
internal Dictionary<string, string> errorWarnings = new Dictionary<string, string>(); // treat specific warnings as errors
|
internal Dictionary<string, string> errorWarnings = new Dictionary<string, string>(); // treat specific warnings as errors
|
||||||
|
|
Загрузка…
Ссылка в новой задаче