Fix symbol index-to-addend bug (#336)

This commit is contained in:
First Last
2026-02-21 20:15:53 -08:00
committed by GitHub
parent 66c879a95d
commit 7ad1f95bf7
+2 -2
View File
@@ -238,9 +238,9 @@ impl Arch for ArchPpc {
addend: 0,
})),
|(_, reloc)| match reloc.target() {
object::RelocationTarget::Symbol(index) => Ok(Some(RelocationOverride {
object::RelocationTarget::Symbol(_) => Ok(Some(RelocationOverride {
target: RelocationOverrideTarget::Keep,
addend: index.0 as u16 as i16 as i64,
addend: 0,
})),
target => Err(anyhow!("Unsupported IMAGE_REL_PPC_PAIR target {target:?}")),
},