mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-13 11:41:44 +00:00
Started prelimary work on the ELF format.
This commit is contained in:
parent
ba44dbc2e7
commit
5205ca8577
2 changed files with 38 additions and 0 deletions
|
|
@ -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" />
|
||||
|
|
|
|||
37
source/Cosmos/Cosmos.Kernel/LinkedFormats/ELF.cs
Normal file
37
source/Cosmos/Cosmos.Kernel/LinkedFormats/ELF.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue