From 80b07dfa158bb093cc93e602363655b62ae595f8 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 22 Dec 2023 13:46:10 -0700 Subject: Support function recognizers in Rust architecture plugins --- rust/src/symbol.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rust/src/symbol.rs') diff --git a/rust/src/symbol.rs b/rust/src/symbol.rs index 0e90c15c..bb9d157e 100644 --- a/rust/src/symbol.rs +++ b/rust/src/symbol.rs @@ -275,6 +275,13 @@ impl Symbol { pub fn external(&self) -> bool { self.binding() == Binding::Weak || self.binding() == Binding::Global } + + pub fn imported_function_from_import_address_symbol(sym: &Symbol, addr: u64) -> Ref { + unsafe { + let res = BNImportedFunctionFromImportAddressSymbol(sym.handle, addr); + Symbol::ref_from_raw(res) + } + } } unsafe impl Send for Symbol {} -- cgit v1.3.1