Started prelimary work on the ELF format.

This commit is contained in:
moitoius_cp 2008-01-07 09:43:28 +00:00
parent ba44dbc2e7
commit 5205ca8577
2 changed files with 38 additions and 0 deletions

View file

@ -72,6 +72,7 @@
<Compile Include="FileSystem\FileSystem2.cs" />
<Compile Include="FileSystem\Path.cs" />
<Compile Include="FileSystem\TestsMatthijs.cs" />
<Compile Include="LinkedFormats\ELF.cs" />
<Compile Include="Staging\DefaultStageQueue.cs" />
<Compile Include="Staging\IStage.cs" />
<Compile Include="Staging\StageQueue.cs" />

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Cosmos.Kernel.LinkedFormats
{
/// <summary>
/// Allows an ELF file to be loaded.
/// </summary>
public class ELF
{
/// <summary>
/// Loads an ELF file into the next available position in memory.
/// </summary>
/// <param name="reader"></param>
/// <returns>The starting position for the code.</returns>
public long Load(Stream reader)
{
if (reader.CanRead == false)
throw new InvalidOperationException("Stream provided is not readable.");
return -1;
}
/// <summary>
///
/// </summary>
/// <param name="reader"></param>
/// <param name="position"></param>
/// <returns>Whether or not the code was loaded.</returns>
public bool Load(Stream reader, long position)
{
return -1;
}
}
}