Skip to content

Commit 85e5fd9

Browse files
committed
Show reloc diff in func view when data content differs
1 parent 9ab2463 commit 85e5fd9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

objdiff-core/src/diff/code.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ use crate::{
99
DiffObjConfig, ObjInsArgDiff, ObjInsBranchFrom, ObjInsBranchTo, ObjInsDiff, ObjInsDiffKind,
1010
ObjSymbolDiff,
1111
},
12-
obj::{ObjInfo, ObjInsArg, ObjReloc, ObjSection, ObjSymbol, ObjSymbolFlags, SymbolRef},
12+
obj::{
13+
ObjInfo, ObjInsArg, ObjReloc, ObjSection, ObjSymbol, ObjSymbolFlags, ObjSymbolKind,
14+
SymbolRef,
15+
},
1316
};
1417

1518
pub fn process_code_symbol(
@@ -234,6 +237,9 @@ fn reloc_eq(
234237
// Match if section and name or address match
235238
section_name_eq(left_obj, right_obj, *sl, *sr)
236239
&& (symbol_name_matches || address_eq(left, right))
240+
&& (left.target.kind != ObjSymbolKind::Object
241+
|| right.target.name.starts_with("...")
242+
|| left.target.bytes == right.target.bytes)
237243
}
238244
(Some(_), None) => false,
239245
(None, Some(_)) => {

0 commit comments

Comments
 (0)