Improve data section diffing more

This re-implements the older algorithm
used for data and BSS section match
percentages. We perform both and
choose the highest match percent
between the two options.

Resolves #84, #85
This commit is contained in:
2024-08-11 13:53:52 -06:00
parent 952b6a63c3
commit e1ccee1e73
3 changed files with 75 additions and 14 deletions

View File

@@ -149,7 +149,7 @@ fn symbols_by_section(
}
}
}
result.sort_by_key(|v| v.address);
result.sort_by(|a, b| a.address.cmp(&b.address).then(a.size.cmp(&b.size)));
let mut iter = result.iter_mut().peekable();
while let Some(symbol) = iter.next() {
if symbol.size == 0 {