Move solution and projects to src

This commit is contained in:
TSR Berry
2023-04-08 01:22:00 +02:00
committed by Mary
parent cd124bda58
commit cee7121058
3466 changed files with 55 additions and 55 deletions

View File

@@ -0,0 +1,15 @@
namespace Ryujinx.HLE.Loaders.Elf
{
struct ElfDynamic
{
public ElfDynamicTag Tag { get; private set; }
public long Value { get; private set; }
public ElfDynamic(ElfDynamicTag tag, long value)
{
Tag = tag;
Value = value;
}
}
}

View File

@@ -0,0 +1,75 @@
using System.Diagnostics.CodeAnalysis;
namespace Ryujinx.HLE.Loaders.Elf
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
enum ElfDynamicTag
{
DT_NULL = 0,
DT_NEEDED = 1,
DT_PLTRELSZ = 2,
DT_PLTGOT = 3,
DT_HASH = 4,
DT_STRTAB = 5,
DT_SYMTAB = 6,
DT_RELA = 7,
DT_RELASZ = 8,
DT_RELAENT = 9,
DT_STRSZ = 10,
DT_SYMENT = 11,
DT_INIT = 12,
DT_FINI = 13,
DT_SONAME = 14,
DT_RPATH = 15,
DT_SYMBOLIC = 16,
DT_REL = 17,
DT_RELSZ = 18,
DT_RELENT = 19,
DT_PLTREL = 20,
DT_DEBUG = 21,
DT_TEXTREL = 22,
DT_JMPREL = 23,
DT_BIND_NOW = 24,
DT_INIT_ARRAY = 25,
DT_FINI_ARRAY = 26,
DT_INIT_ARRAYSZ = 27,
DT_FINI_ARRAYSZ = 28,
DT_RUNPATH = 29,
DT_FLAGS = 30,
DT_ENCODING = 32,
DT_PREINIT_ARRAY = 32,
DT_PREINIT_ARRAYSZ = 33,
DT_GNU_PRELINKED = 0x6ffffdf5,
DT_GNU_CONFLICTSZ = 0x6ffffdf6,
DT_GNU_LIBLISTSZ = 0x6ffffdf7,
DT_CHECKSUM = 0x6ffffdf8,
DT_PLTPADSZ = 0x6ffffdf9,
DT_MOVEENT = 0x6ffffdfa,
DT_MOVESZ = 0x6ffffdfb,
DT_FEATURE_1 = 0x6ffffdfc,
DT_POSFLAG_1 = 0x6ffffdfd,
DT_SYMINSZ = 0x6ffffdfe,
DT_SYMINENT = 0x6ffffdff,
DT_GNU_HASH = 0x6ffffef5,
DT_TLSDESC_PLT = 0x6ffffef6,
DT_TLSDESC_GOT = 0x6ffffef7,
DT_GNU_CONFLICT = 0x6ffffef8,
DT_GNU_LIBLIST = 0x6ffffef9,
DT_CONFIG = 0x6ffffefa,
DT_DEPAUDIT = 0x6ffffefb,
DT_AUDIT = 0x6ffffefc,
DT_PLTPAD = 0x6ffffefd,
DT_MOVETAB = 0x6ffffefe,
DT_SYMINFO = 0x6ffffeff,
DT_VERSYM = 0x6ffffff0,
DT_RELACOUNT = 0x6ffffff9,
DT_RELCOUNT = 0x6ffffffa,
DT_FLAGS_1 = 0x6ffffffb,
DT_VERDEF = 0x6ffffffc,
DT_VERDEFNUM = 0x6ffffffd,
DT_VERNEED = 0x6ffffffe,
DT_VERNEEDNUM = 0x6fffffff,
DT_AUXILIARY = 0x7ffffffd,
DT_FILTER = 0x7fffffff
}
}

View File

@@ -0,0 +1,35 @@
namespace Ryujinx.HLE.Loaders.Elf
{
struct ElfSymbol
{
public string Name { get; private set; }
public ElfSymbolType Type { get; private set; }
public ElfSymbolBinding Binding { get; private set; }
public ElfSymbolVisibility Visibility { get; private set; }
public bool IsFuncOrObject => Type == ElfSymbolType.SttFunc || Type == ElfSymbolType.SttObject;
public bool IsGlobalOrWeak => Binding == ElfSymbolBinding.StbGlobal || Binding == ElfSymbolBinding.StbWeak;
public int ShIdx { get; private set; }
public ulong Value { get; private set; }
public ulong Size { get; private set; }
public ElfSymbol(
string name,
int info,
int other,
int shIdx,
ulong value,
ulong size)
{
Name = name;
Type = (ElfSymbolType)(info & 0xf);
Binding = (ElfSymbolBinding)(info >> 4);
Visibility = (ElfSymbolVisibility)other;
ShIdx = shIdx;
Value = value;
Size = size;
}
}
}

View File

@@ -0,0 +1,14 @@
namespace Ryujinx.HLE.Loaders.Elf
{
struct ElfSymbol32
{
#pragma warning disable CS0649
public uint NameOffset;
public uint ValueAddress;
public uint Size;
public byte Info;
public byte Other;
public ushort SectionIndex;
#pragma warning restore CS0649
}
}

View File

@@ -0,0 +1,14 @@
namespace Ryujinx.HLE.Loaders.Elf
{
struct ElfSymbol64
{
#pragma warning disable CS0649
public uint NameOffset;
public byte Info;
public byte Other;
public ushort SectionIndex;
public ulong ValueAddress;
public ulong Size;
#pragma warning restore CS0649
}
}

View File

@@ -0,0 +1,9 @@
namespace Ryujinx.HLE.Loaders.Elf
{
enum ElfSymbolBinding
{
StbLocal = 0,
StbGlobal = 1,
StbWeak = 2
}
}

View File

@@ -0,0 +1,13 @@
namespace Ryujinx.HLE.Loaders.Elf
{
enum ElfSymbolType
{
SttNoType = 0,
SttObject = 1,
SttFunc = 2,
SttSection = 3,
SttFile = 4,
SttCommon = 5,
SttTls = 6
}
}

View File

@@ -0,0 +1,10 @@
namespace Ryujinx.HLE.Loaders.Elf
{
enum ElfSymbolVisibility
{
StvDefault = 0,
StvInternal = 1,
StvHidden = 2,
StvProtected = 3
}
}