Support R_MIPS_GPREL16 relocations correctly (#88)

* Support R_MIPS_GPREL16 relocations correctly

symbols defined in the same file require adding a
special ri_gp_value from the .reginfo section to
their relocation calculations.

* Run nightly rustfmt

* Prevent potential panic when slicing .reginfo
This commit is contained in:
Steven Casper
2024-08-08 22:20:41 -04:00
committed by GitHub
parent fc598af329
commit 09cc9952df
6 changed files with 46 additions and 8 deletions

View File

@@ -128,6 +128,7 @@ impl ObjArch for ObjArchX86 {
fn implcit_addend(
&self,
_file: &File<'_>,
section: &ObjSection,
address: u64,
reloc: &Relocation,