Skip to content

Commit 21f8f24

Browse files
committed
Relax symbol comparison logic
The Ghidra delinker plugin emits functions with type STT_OBJECT, rather than STT_FUNC. The current logic was preventing these from being compared based on their symbol type. Relax this condition for now.
1 parent d2b7a9e commit 21f8f24

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

objdiff-core/src/diff/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ fn generate_mapping_symbols(
577577
let Some(base_symbol_ref) = symbol_ref_by_name(base_obj, base_name) else {
578578
return Ok(());
579579
};
580-
let (base_section, base_symbol) = base_obj.section_symbol(base_symbol_ref);
580+
let (base_section, _base_symbol) = base_obj.section_symbol(base_symbol_ref);
581581
let Some(base_section) = base_section else {
582582
return Ok(());
583583
};
@@ -588,9 +588,7 @@ fn generate_mapping_symbols(
588588
for (target_section_index, target_section) in
589589
target_obj.sections.iter().enumerate().filter(|(_, s)| s.kind == base_section.kind)
590590
{
591-
for (target_symbol_index, _target_symbol) in
592-
target_section.symbols.iter().enumerate().filter(|(_, s)| s.kind == base_symbol.kind)
593-
{
591+
for (target_symbol_index, _target_symbol) in target_section.symbols.iter().enumerate() {
594592
let target_symbol_ref =
595593
SymbolRef { section_idx: target_section_index, symbol_idx: target_symbol_index };
596594
match base_section.kind {

0 commit comments

Comments
 (0)