Skip to content

Commit eb06227

Browse files
committed
Fix showing incorrect diff when diffing weak stripped symbol with an addend
This is a regression that was introduced by encounter#158 diffing addends in addition to symbol names. But it's not really a bug in that PR, rather it seems like I simply never added the offset into the addend when creating a fake pool relocation for an extern symbol. So this commit fixes that root issue instead.
1 parent b6861dc commit eb06227

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

objdiff-core/src/arch/ppc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ fn make_fake_pool_reloc(
645645
// example, dCcD_Cyl in The Wind Waker). So just showing that vtable symbol plus an addend
646646
// to represent the offset into it works fine in this case.
647647
target_symbol = pool_reloc.relocation.target_symbol;
648-
addend = pool_reloc.relocation.addend;
648+
addend = pool_reloc.relocation.addend + offset_from_pool;
649649
}
650650
Some(Relocation {
651651
flags: RelocationFlags::Elf(elf::R_PPC_NONE),

0 commit comments

Comments
 (0)