ELF: Ignore relocations into memory addresses not mapped from the image (part of #14)
This commit is contained in:
@@ -193,8 +193,15 @@ namespace Il2CppInspector
|
|||||||
foreach (var rel in rels) {
|
foreach (var rel in rels) {
|
||||||
var symValue = ReadObject<TSym>(conv.Long(rel.SymbolTable) + conv.Long(rel.SymbolIndex) * relsz).st_value; // S
|
var symValue = ReadObject<TSym>(conv.Long(rel.SymbolTable) + conv.Long(rel.SymbolIndex) * relsz).st_value; // S
|
||||||
|
|
||||||
// The addend is specified in the struct for rela, and comes from the target location for rel
|
// Ignore relocations into memory addresses not mapped from the image
|
||||||
|
try {
|
||||||
Position = MapVATR(conv.ULong(rel.Offset));
|
Position = MapVATR(conv.ULong(rel.Offset));
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The addend is specified in the struct for rela, and comes from the target location for rel
|
||||||
var addend = rel.Addend ?? ReadObject<TWord>(); // A
|
var addend = rel.Addend ?? ReadObject<TWord>(); // A
|
||||||
|
|
||||||
// Only handle relocation types we understand, skip the rest
|
// Only handle relocation types we understand, skip the rest
|
||||||
|
|||||||
Reference in New Issue
Block a user