protected override void Run() { using (var file = new FileStream(CompilerOptions.OutputFile, FileMode.Create)) { Linker.Emit(file); } }
protected override void RunPostCompile() { if (string.IsNullOrEmpty(CompilerOptions.OutputFile)) { return; } File.Delete(CompilerOptions.OutputFile); if (Compiler.IsStopped) { return; } using (var file = new FileStream(CompilerOptions.OutputFile, FileMode.Create)) { Linker.Emit(file); } }
protected override void Finalization() { if (!CompilerOptions.EmitBinary) { return; } if (string.IsNullOrEmpty(CompilerOptions.OutputFile)) { return; } Compiler.PostCompilerTraceEvent(CompilerEvent.LinkingStart); File.Delete(CompilerOptions.OutputFile); using (var file = new FileStream(CompilerOptions.OutputFile, FileMode.Create)) { Linker.Emit(file); } Compiler.PostCompilerTraceEvent(CompilerEvent.LinkingEnd); }
protected override void Run() { var stream = new MemoryStream(); var reader = new BinaryReader(stream); Linker.Emit(stream); foreach (var section in Linker.LinkerSections) { stream.Position = section.FileOffset; for (uint i = 0; i < section.Size; i = i + 4) { uint value = reader.ReadUInt32(); simAdapter.SimCPU.DirectWrite32((ulong)(section.VirtualAddress + i), value); } } UpdateSim(); symbolData = null; }
protected override void Run() { var file = new SimStream(simCPU, Linker.BaseAddress); Linker.Emit(file); }