tools: Add script to automatically identify matches

Given a list L of functions to identify and a small list of
candidates C, this tool will attempt to automatically identify matches
by checking each function in L against each function in C.

Very slow, but this should work well enough for small lists.
This commit is contained in:
Léo Lam
2020-11-09 17:31:49 +01:00
parent 844db4220c
commit ce5ff17666
9 changed files with 237 additions and 21 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ def dump_fn(name: str) -> None:
fn = util.elf.get_fn_from_my_elf(name)
path = expected_dir / f"{name}.bin"
path.parent.mkdir(exist_ok=True)
path.write_bytes(fn)
path.write_bytes(fn.data)
except KeyError:
utils.fail("could not find function")