Add Mach-O relocation processing stub

This commit is contained in:
Katy Coe
2019-10-22 23:41:18 +02:00
parent 8299414fba
commit dda58af124
2 changed files with 27 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ namespace Il2CppInspector
public uint ImageOffset;
public uint Align;
public uint ImageRelocOffset;
public uint NumRelocEntries;
public int NumRelocEntries;
public uint Flags;
public uint Reserved1;
public TWord Reserved2;
@@ -104,4 +104,16 @@ namespace Il2CppInspector
public ushort n_desc;
public TWord n_value;
}
internal class MachO_relocation_info
{
public int r_address;
public uint r_data;
public uint r_symbolnum => r_data & 0x00ffffff;
public bool r_pcrel => ((r_data >> 24) & 1) == 1;
public uint r_length => (r_data >> 25) & 3;
public bool r_extern => ((r_data >> 27) & 1) == 1;
public uint r_type => r_data >> 28;
}
}