summaryrefslogtreecommitdiff
path: root/rust/src/relocation.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-30 17:38:40 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commitc3fdda9727f5507818e3f55576ad32215a22b0f9 (patch)
treed522025055eb7253c7f2cb94732402aacf2afbfc /rust/src/relocation.rs
parentc3f344a38ca4b027b4e69b0f82d3184622d6da79 (diff)
[Rust] Remove Architecture trait bound on LLIL related structures
Diffstat (limited to 'rust/src/relocation.rs')
-rw-r--r--rust/src/relocation.rs8
1 files changed, 4 insertions, 4 deletions
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<RelocationOperand> 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<CoreRelocationHandler> {
_data: &[u8],
_addr: u64,
// TODO: Are we sure this is not a liftedilfunction?
- _il: &RegularLowLevelILFunction<CoreArchitecture>,
+ _il: &RegularLowLevelILFunction,
_reloc: &Relocation,
) -> RelocationOperand {
RelocationOperand::AutocoerceExternPtr
@@ -363,7 +363,7 @@ impl RelocationHandler for CoreRelocationHandler {
&self,
data: &[u8],
addr: u64,
- il: &RegularLowLevelILFunction<CoreArchitecture>,
+ 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)