2018-06-11 02:46:42 +02:00
|
|
|
namespace Ryujinx.HLE.Loaders
|
2018-02-05 00:08:20 +01:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
|
2018-06-11 02:46:42 +02:00
|
|
|
public bool IsGlobalOrWeak =>
|
2018-02-05 00:08:20 +01:00
|
|
|
Binding == ElfSymBinding.STB_GLOBAL ||
|
|
|
|
Binding == ElfSymBinding.STB_WEAK;
|
|
|
|
|
2018-02-26 02:14:58 +01:00
|
|
|
public int SHIdx { get; private set; }
|
|
|
|
public long Value { get; private set; }
|
|
|
|
public long Size { get; private set; }
|
2018-02-05 00:08:20 +01:00
|
|
|
|
|
|
|
public ElfSym(
|
|
|
|
string Name,
|
2018-06-11 02:46:42 +02:00
|
|
|
int Info,
|
2018-02-05 00:08:20 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|