diff options
Diffstat (limited to 'src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeMethodHandleNode.cs')
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeMethodHandleNode.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeMethodHandleNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeMethodHandleNode.cs index c40987f3c..39884096a 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeMethodHandleNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeMethodHandleNode.cs @@ -35,10 +35,20 @@ namespace ILCompiler.DependencyAnalysis } public int Offset => 0; protected override string GetName(NodeFactory factory) => this.GetMangledName(factory.NameMangler); - public override ObjectNodeSection Section => ObjectNodeSection.ReadOnlyDataSection; public override bool IsShareable => false; public override bool StaticDependenciesAreComputed => true; + public override ObjectNodeSection Section + { + get + { + if (_targetMethod.Context.Target.IsWindows) + return ObjectNodeSection.ReadOnlyDataSection; + else + return ObjectNodeSection.DataSection; + } + } + protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) { DependencyList dependencies = null; @@ -70,9 +80,9 @@ namespace ILCompiler.DependencyAnalysis return objData.ToObjectData(); } - protected internal override int ClassCode => -274400625; + public override int ClassCode => -274400625; - protected internal override int CompareToImpl(SortableDependencyNode other, CompilerComparer comparer) + public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { return comparer.Compare(_targetMethod, ((RuntimeMethodHandleNode)other)._targetMethod); } |