MCPcopy Index your code
hub / github.com/encounter/objdiff / is_pc_offset_reloc

Function is_pc_offset_reloc

objdiff-core/src/arch/arm64.rs:2076–2088  ·  view source on GitHub ↗

Relocations that appear in Operand::PCOffset.

(reloc: Option<ResolvedRelocation>)

Source from the content-addressed store, hash-verified

2074
2075/// Relocations that appear in Operand::PCOffset.
2076fn is_pc_offset_reloc(reloc: Option<ResolvedRelocation>) -> Option<ResolvedRelocation> {
2077 if let Some(resolved) = reloc
2078 && let RelocationFlags::Elf(
2079 elf::R_AARCH64_ADR_PREL_PG_HI21
2080 | elf::R_AARCH64_JUMP26
2081 | elf::R_AARCH64_CALL26
2082 | elf::R_AARCH64_ADR_GOT_PAGE,
2083 ) = resolved.relocation.flags
2084 {
2085 return Some(resolved);
2086 }
2087 None
2088}
2089
2090/// Relocations that appear in Operand::Immediate.
2091fn is_imm_reloc(resolved: Option<ResolvedRelocation>) -> bool {

Callers 1

push_operandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected