diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-06-10 21:46:42 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-06-10 21:46:42 -0300 |
| commit | 76f3b1b3a4637ec72abfbb8cbc0679f2e0ca838f (patch) | |
| tree | 0411b709de31c1c0517763512df8eeb9f7491bc9 /Ryujinx.HLE/Loaders/ElfSym.cs | |
| parent | 518fe799da6dd4f12c58c9e6e174767effb0b868 (diff) | |
Rename Ryujinx.Core to Ryujinx.HLE and add a separate project for a future LLE implementation
Diffstat (limited to 'Ryujinx.HLE/Loaders/ElfSym.cs')
| -rw-r--r-- | Ryujinx.HLE/Loaders/ElfSym.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Ryujinx.HLE/Loaders/ElfSym.cs b/Ryujinx.HLE/Loaders/ElfSym.cs new file mode 100644 index 00000000..869938d3 --- /dev/null +++ b/Ryujinx.HLE/Loaders/ElfSym.cs @@ -0,0 +1,40 @@ +namespace Ryujinx.HLE.Loaders +{ + struct ElfSym + { + public string Name { get; private set; } + + public ElfSymType Type { get; private set; } + public ElfSymBinding Binding { get; private set; } + public ElfSymVisibility Visibility { get; private set; } + + public bool IsFuncOrObject => + Type == ElfSymType.STT_FUNC || + Type == ElfSymType.STT_OBJECT; + + public bool IsGlobalOrWeak => + Binding == ElfSymBinding.STB_GLOBAL || + Binding == ElfSymBinding.STB_WEAK; + + public int SHIdx { get; private set; } + public long Value { get; private set; } + public long Size { get; private set; } + + public ElfSym( + string Name, + int Info, + int Other, + int SHIdx, + long Value, + long Size) + { + this.Name = Name; + this.Type = (ElfSymType)(Info & 0xf); + this.Binding = (ElfSymBinding)(Info >> 4); + this.Visibility = (ElfSymVisibility)Other; + this.SHIdx = SHIdx; + this.Value = Value; + this.Size = Size; + } + } +}
\ No newline at end of file |
