ELF: Refuse to process dumped file if no image base supplied

This commit is contained in:
Katy Coe
2020-12-11 22:45:07 +01:00
parent 08c1559222
commit 8cdc8c8850

View File

@@ -7,7 +7,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -197,6 +196,11 @@ namespace Il2CppInspector
}
}
// Dumped images must be rebased
if (isDumpedImage && !(LoadOptions?.ImageBase is ulong newImageBase)) {
throw new InvalidOperationException("To load a dumped ELF image, you must specify the image base virtual address");
}
// Get section name mappings if there are any
// This is currently only used to defeat the XOR obfuscation handled below
// Note: There can be more than one section with the same name, or unnamed; we take the first section with a given name