Unify symbol table format and implement for Elf and Mach-O

This commit is contained in:
Katy Coe
2020-08-09 00:30:18 +02:00
parent e536a3b1eb
commit 00c2e8ad44
7 changed files with 127 additions and 21 deletions

View File

@@ -27,7 +27,7 @@ namespace Il2CppInspector
int Bits { get; }
ulong GlobalOffset { get; } // The virtual address where the code section (.text) would be loaded in memory
ulong ImageBase { get; } // The virtual address of where the image would be loaded in memory (same as GlobalOffset except for PE)
Dictionary<string, ulong> GetSymbolTable();
Dictionary<string, Symbol> GetSymbolTable();
uint[] GetFunctionTable();
IEnumerable<Export> GetExports();
U ReadMappedObject<U>(ulong uiAddr) where U : new();
@@ -140,7 +140,7 @@ namespace Il2CppInspector
public virtual IFileFormatReader this[uint index] => (index == 0)? this : throw new IndexOutOfRangeException("Binary image index out of bounds");
// Find search locations in the symbol table for Il2Cpp data
public virtual Dictionary<string, ulong> GetSymbolTable() => null;
public virtual Dictionary<string, Symbol> GetSymbolTable() => new Dictionary<string, Symbol>();
// Find search locations in the machine code for Il2Cpp data
public virtual uint[] GetFunctionTable() => throw new NotImplementedException();