mirror of
https://github.com/encounter/objdiff.git
synced 2026-07-10 12:18:36 -07:00
Implement diffing relocations within data sections (#154)
* Data view: Show data bytes with differing relocations as a diff * Data view: Show differing relocations on hover * Symbol list view: Adjust symbol/section match %s when relocations differ * Improve data reloc diffing logic * Don't make reloc diffs cause bytes to show as red or green * Properly detect byte size of each relocation * Data view: Add context menu for copying relocation target symbols * Also show already-matching relocations on hover/right click * Change font color for nonmatching relocs on hover
This commit is contained in:
@@ -173,6 +173,21 @@ impl ObjArch for ObjArchArm64 {
|
||||
_ => Cow::Owned(format!("<{flags:?}>")),
|
||||
}
|
||||
}
|
||||
|
||||
fn get_reloc_byte_size(&self, flags: RelocationFlags) -> usize {
|
||||
match flags {
|
||||
RelocationFlags::Elf { r_type } => match r_type {
|
||||
elf::R_AARCH64_ABS64 => 8,
|
||||
elf::R_AARCH64_ABS32 => 4,
|
||||
elf::R_AARCH64_ABS16 => 2,
|
||||
elf::R_AARCH64_PREL64 => 8,
|
||||
elf::R_AARCH64_PREL32 => 4,
|
||||
elf::R_AARCH64_PREL16 => 2,
|
||||
_ => 1,
|
||||
},
|
||||
_ => 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct DisplayCtx<'a> {
|
||||
|
||||
Reference in New Issue
Block a user