Skip to content

Commit c3ab203

Browse files
committed
R_MIPS_GPREL32 Support
1 parent 572afa8 commit c3ab203

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

objdiff-core/src/arch/mips.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ impl Arch for ArchMips {
293293
}
294294
elf::R_MIPS_PC16 => 0, // PC-relative relocation
295295
R_MIPS15_S3 => ((code & 0x001FFFC0) >> 3) as i64,
296+
elf::R_MIPS_GPREL32 => {
297+
(code as i32 as i64) + self.ri_gp_value as i64
298+
},
296299
flags => bail!("Unsupported MIPS implicit relocation {flags:?}"),
297300
};
298301
Ok(Some(RelocationOverride { target: RelocationOverrideTarget::Keep, addend }))

0 commit comments

Comments
 (0)