mirror of
https://github.com/encounter/objdiff.git
synced 2025-06-07 15:13:47 +00:00
PPC: Fix pooled relocation addends being added twice sometimes (#184)
This commit is contained in:
parent
e101610416
commit
b9ba5796ed
@ -513,6 +513,7 @@ fn guess_data_type_from_load_store_inst_op(inst_op: ppc750cl::Opcode) -> Option<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct PoolReference {
|
struct PoolReference {
|
||||||
addr_src_gpr: ppc750cl::GPR,
|
addr_src_gpr: ppc750cl::GPR,
|
||||||
addr_offset: i16,
|
addr_offset: i16,
|
||||||
@ -645,7 +646,7 @@ fn make_fake_pool_reloc(
|
|||||||
// example, dCcD_Cyl in The Wind Waker). So just showing that vtable symbol plus an addend
|
// example, dCcD_Cyl in The Wind Waker). So just showing that vtable symbol plus an addend
|
||||||
// to represent the offset into it works fine in this case.
|
// to represent the offset into it works fine in this case.
|
||||||
target_symbol = pool_reloc.relocation.target_symbol;
|
target_symbol = pool_reloc.relocation.target_symbol;
|
||||||
addend = pool_reloc.relocation.addend + offset_from_pool;
|
addend = offset_from_pool;
|
||||||
}
|
}
|
||||||
Some(Relocation {
|
Some(Relocation {
|
||||||
flags: RelocationFlags::Elf(elf::R_PPC_NONE),
|
flags: RelocationFlags::Elf(elf::R_PPC_NONE),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user