Skip to content

Commit 926dd06

Browse files
authored
Handle IMAGE_REL_PPC_ADDR32 size in Coff (#320)
1 parent de70b6f commit 926dd06

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • objdiff-core/src/arch/ppc

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,13 @@ impl Arch for ArchPpc {
342342
elf::R_PPC_UADDR32 => 4,
343343
_ => 1,
344344
},
345-
_ => 1,
345+
RelocationFlags::Coff(r_type) => match r_type {
346+
pe::IMAGE_REL_PPC_ADDR32 => 4,
347+
pe::IMAGE_REL_PPC_REFHI => 2,
348+
pe::IMAGE_REL_PPC_REFLO => 2,
349+
pe::IMAGE_REL_PPC_REL24 => 3,
350+
_ => 1,
351+
},
346352
}
347353
}
348354

0 commit comments

Comments
 (0)