diff options
Diffstat (limited to 'src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeFieldHandleNode.cs')
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeFieldHandleNode.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeFieldHandleNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeFieldHandleNode.cs index 57a4018fd..c5eaeddfe 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeFieldHandleNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/RuntimeFieldHandleNode.cs @@ -29,10 +29,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 (_targetField.Context.Target.IsWindows) + return ObjectNodeSection.ReadOnlyDataSection; + else + return ObjectNodeSection.DataSection; + } + } + private static Utf8String s_NativeLayoutSignaturePrefix = new Utf8String("__RFHSignature_"); protected override DependencyList ComputeNonRelocationBasedDependencies(NodeFactory factory) @@ -55,9 +65,9 @@ namespace ILCompiler.DependencyAnalysis return objData.ToObjectData(); } - protected internal override int ClassCode => -1326215725; + public override int ClassCode => -1326215725; - protected internal override int CompareToImpl(SortableDependencyNode other, CompilerComparer comparer) + public override int CompareToImpl(ISortableNode other, CompilerComparer comparer) { return comparer.Compare(_targetField, ((RuntimeFieldHandleNode)other)._targetField); } |