From c3fdda9727f5507818e3f55576ad32215a22b0f9 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 30 Apr 2025 17:38:40 -0400 Subject: [Rust] Remove Architecture trait bound on LLIL related structures --- rust/src/relocation.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src/relocation.rs') diff --git a/rust/src/relocation.rs b/rust/src/relocation.rs index 8fa9a86b..f10115c8 100644 --- a/rust/src/relocation.rs +++ b/rust/src/relocation.rs @@ -83,7 +83,7 @@ impl From for usize { } // TODO: How to handle related relocation linked lists? -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct RelocationInfo { pub type_: RelocationType, pub pc_relative: bool, @@ -265,7 +265,7 @@ pub trait RelocationHandler: 'static + Sized + AsRef { _data: &[u8], _addr: u64, // TODO: Are we sure this is not a liftedilfunction? - _il: &RegularLowLevelILFunction, + _il: &RegularLowLevelILFunction, _reloc: &Relocation, ) -> RelocationOperand { RelocationOperand::AutocoerceExternPtr @@ -363,7 +363,7 @@ impl RelocationHandler for CoreRelocationHandler { &self, data: &[u8], addr: u64, - il: &RegularLowLevelILFunction, + il: &RegularLowLevelILFunction, reloc: &Relocation, ) -> RelocationOperand { unsafe { @@ -496,7 +496,7 @@ where return RelocationOperand::Invalid.into(); } let arch = unsafe { CoreArchitecture::from_raw(arch) }; - let il = unsafe { RegularLowLevelILFunction::from_raw(arch, il) }; + let il = unsafe { RegularLowLevelILFunction::from_raw_with_arch(il, Some(arch)) }; custom_handler .get_operand_for_external_relocation(data, addr, &il, &reloc) -- cgit v1.3.1