Exemplo n.º 1
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            ObjectDataBuilder objData = new ObjectDataBuilder(factory);
            objData.RequirePointerAlignment();
            objData.DefinedSymbols.Add(this);
            ObjectAndOffsetSymbolNode startNode = new ObjectAndOffsetSymbolNode(this, 0, "__modules_a");
            ObjectAndOffsetSymbolNode endNode = new ObjectAndOffsetSymbolNode(this, 0, "__modules_z");

            if (factory.Target.OperatingSystem != Internal.TypeSystem.TargetOS.Windows)
            {
                // Temporary work-around for Linux / OSX until CLI is updated
                objData.DefinedSymbols.Add(startNode);
            }

            objData.EmitPointerReloc(factory.ReadyToRunHeader);

            if (factory.Target.OperatingSystem != Internal.TypeSystem.TargetOS.Windows)
            {
                // Temporary work-around for Linux / OSX until CLI is updated
                endNode.SetSymbolOffset(objData.CountBytes);
                objData.DefinedSymbols.Add(endNode);
                objData.EmitZeroPointer();
            }

            return objData.ToObjectData();
        }
Exemplo n.º 2
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            ObjectDataBuilder objData = new ObjectDataBuilder(factory);

            objData.RequirePointerAlignment();
            objData.DefinedSymbols.Add(this);
            ObjectAndOffsetSymbolNode startNode = new ObjectAndOffsetSymbolNode(this, 0, "__modules_a");
            ObjectAndOffsetSymbolNode endNode   = new ObjectAndOffsetSymbolNode(this, 0, "__modules_z");

            if (factory.Target.OperatingSystem != Internal.TypeSystem.TargetOS.Windows)
            {
                // Temporary work-around for Linux / OSX until CLI is updated
                objData.DefinedSymbols.Add(startNode);
            }

            objData.EmitPointerReloc(factory.ReadyToRunHeader);

            if (factory.Target.OperatingSystem != Internal.TypeSystem.TargetOS.Windows)
            {
                // Temporary work-around for Linux / OSX until CLI is updated
                endNode.SetSymbolOffset(objData.CountBytes);
                objData.DefinedSymbols.Add(endNode);
                objData.EmitZeroPointer();
            }

            return(objData.ToObjectData());
        }
Exemplo n.º 3
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            var builder = new ObjectDataBuilder(factory);

            builder.RequirePointerAlignment();
            builder.DefinedSymbols.Add(this);

            builder.EmitPointerReloc(_indirectedNode);

            return(builder.ToObjectData());
        }
Exemplo n.º 4
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            ObjectDataBuilder objData = new ObjectDataBuilder(factory);
            objData.RequirePointerAlignment();
            objData.DefinedSymbols.Add(this);
            if (factory.Target.OperatingSystem == Internal.TypeSystem.TargetOS.OSX)
            {
                objData.EmitPointerReloc(factory.JumpThunk((ExternSymbolNode)factory.ExternSymbol("RegisterReadyToRunModule"), factory.ReadyToRunHeader));
            }
            else
            {
                objData.EmitPointerReloc(factory.ReadyToRunHeader);
            }

            return objData.ToObjectData();
        }
Exemplo n.º 5
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            ObjectDataBuilder objData = new ObjectDataBuilder(factory);

            objData.RequirePointerAlignment();
            objData.DefinedSymbols.Add(this);
            if (factory.Target.OperatingSystem == Internal.TypeSystem.TargetOS.OSX)
            {
                objData.EmitPointerReloc(factory.JumpThunk((ExternSymbolNode)factory.ExternSymbol("RegisterReadyToRunModule"), factory.ReadyToRunHeader));
            }
            else
            {
                objData.EmitPointerReloc(factory.ReadyToRunHeader);
            }

            return(objData.ToObjectData());
        }