Skip to content

Commit 7ad1f95

Browse files
Fix symbol index-to-addend bug (#336)
1 parent 66c879a commit 7ad1f95

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • objdiff-core/src/arch/ppc

objdiff-core/src/arch/ppc/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ impl Arch for ArchPpc {
238238
addend: 0,
239239
})),
240240
|(_, reloc)| match reloc.target() {
241-
object::RelocationTarget::Symbol(index) => Ok(Some(RelocationOverride {
241+
object::RelocationTarget::Symbol(_) => Ok(Some(RelocationOverride {
242242
target: RelocationOverrideTarget::Keep,
243-
addend: index.0 as u16 as i16 as i64,
243+
addend: 0,
244244
})),
245245
target => Err(anyhow!("Unsupported IMAGE_REL_PPC_PAIR target {target:?}")),
246246
},

0 commit comments

Comments
 (0)