Autodelete old patch diffs
@@ -137,6 +137,10 @@ def try_apply_local_relocation(bin_name, elf_relocation, elf_symbol):
return False
try:
+ # First delete any old patch diffs.
+ for diff_path in glob.glob('./patch_diffs/*_diff.txt'):
+ os.remove(diff_path)
+
with open("linker.ld") as f:
linker_script = f.read()
