Exemplo n.º 1
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            // TODO: define _tls_index as "comdat select any" when multiple object files present.

            ObjectDataBuilder objData = new ObjectDataBuilder(factory, relocsOnly);

            objData.RequireInitialPointerAlignment();
            objData.AddSymbol(this);

            // Emit an aliased symbol named _tls_index for native P/Invoke code that uses TLS. This is required
            // because we do not link against libcmt.lib.
            ObjectAndOffsetSymbolNode aliasedSymbol = new ObjectAndOffsetSymbolNode(this, objData.CountBytes, "_tls_index", false);

            objData.AddSymbol(aliasedSymbol);

            // This is the TLS index field which is a 4-byte integer.
            objData.EmitInt(0);

            return(objData.ToObjectData());
        }
Exemplo n.º 2
0
 public DefaultConstructorMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__DefaultConstructor_Map_End", true);
     _externalReferences = externalReferences;
 }
 public DynamicInvokeTemplateDataNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__dynamic_invoke_template_data_end", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 4
0
 public ArrayOfEmbeddedDataNode(string startSymbolMangledName, string endSymbolMangledName, IComparer <TEmbedded> nodeSorter)
 {
     _startSymbol = new ObjectAndOffsetSymbolNode(this, 0, startSymbolMangledName, true);
     _endSymbol   = new ObjectAndOffsetSymbolNode(this, 0, endSymbolMangledName, true);
     _sorter      = nodeSorter;
 }
Exemplo n.º 5
0
 public ExternalReferencesTableNode(string blobName, TargetDetails targetDetails)
 {
     _blobName  = blobName;
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__external_" + blobName + "_references_End", true);
     _target    = targetDetails;
 }
Exemplo n.º 6
0
 public TypeMetadataMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__type_to_metadata_map_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 7
0
 public ReflectionInvokeMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__method_to_entrypoint_map_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 8
0
 public MetadataNode()
 {
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__embedded_metadata_End", true);
 }
 public ResourceIndexNode(ResourceDataNode resourceDataNode)
 {
     _resourceDataNode = resourceDataNode;
     _endSymbol        = new ObjectAndOffsetSymbolNode(this, 0, "__embedded_resourceindex_End", true);
 }
Exemplo n.º 10
0
 public ExternalReferencesTableNode()
 {
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, this.GetMangledName() + "End");
 }
Exemplo n.º 11
0
 public TypeMetadataMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, this.GetMangledName() + "End");
     _externalReferences = externalReferences;
 }
Exemplo n.º 12
0
 public ClassConstructorContextMap(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, this.GetMangledName() + "End");
     _externalReferences = externalReferences;
 }
Exemplo n.º 13
0
 protected EmbeddedDataContainerNode(string startSymbolMangledName, string endSymbolMangledName)
 {
     _startSymbolMangledName = startSymbolMangledName;
     _startSymbol            = new ObjectAndOffsetSymbolNode(this, 0, startSymbolMangledName, true);
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, endSymbolMangledName, true);
 }
Exemplo n.º 14
0
 public ExternalReferencesTableNode()
 {
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, ((ISymbolNode)this).MangledName + "End");
 }
 public GenericVirtualMethodTableNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__gvm_table_End", true);
     _externalReferences = externalReferences;
     _gvmImplemenations  = new Dictionary <MethodDesc, Dictionary <TypeDesc, MethodDesc> >();
 }
Exemplo n.º 16
0
 public ClassConstructorContextMap(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__type_to_cctorContext_map_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 17
0
 public ReflectionVirtualInvokeMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__VirtualInvokeMap_End", true);
     _externalReferences = externalReferences;
 }
 public ExactMethodInstantiationsNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__exact_method_instantiations_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 19
0
 public ArrayMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__array_type_map_End", true);
     _externalReferences = externalReferences;
 }
 public StructMarshallingStubMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__struct_marshalling_stub_map_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 21
0
 public GenericMethodsTemplateMap(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__GenericMethodsTemplateMap_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 22
0
 public MetadataNode()
 {
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, ((ISymbolNode)this).MangledName + "End");
 }
Exemplo n.º 23
0
 public ResourceDataNode()
 {
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__embedded_resourcedata_End", true);
 }
Exemplo n.º 24
0
 public GenericsHashtableNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__generics_hashtable_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 25
0
 public BlockReflectionTypeMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__block_reflection_type_map_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 26
0
 public ReflectionFieldMapNode(ExternalReferencesTableNode externalReferences)
 {
     _endSymbol          = new ObjectAndOffsetSymbolNode(this, 0, "__field_to_offset_map_End", true);
     _externalReferences = externalReferences;
 }
Exemplo n.º 27
0
 public ExternalReferencesTableNode(string blobName, NodeFactory nodeFactory)
 {
     _blobName    = blobName;
     _endSymbol   = new ObjectAndOffsetSymbolNode(this, 0, "__external_" + blobName + "_references_End", true);
     _nodeFactory = nodeFactory;
 }
Exemplo n.º 28
0
 public StaticsInfoHashtableNode(ExternalReferencesTableNode externalReferences, ExternalReferencesTableNode nativeStaticsReferences)
 {
     _endSymbol               = new ObjectAndOffsetSymbolNode(this, 0, "_StaticsInfoHashtableNode_End", true);
     _externalReferences      = externalReferences;
     _nativeStaticsReferences = nativeStaticsReferences;
 }
 public StackTraceEmbeddedMetadataNode()
 {
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "_stacktrace_embedded_metadata_End", true);
 }
Exemplo n.º 30
0
 public ModuleInitializerListNode()
 {
     _endSymbol = new ObjectAndOffsetSymbolNode(this, 0, "__module_initializers_End", true);
 }