diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-12-22 13:46:10 -0700 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2024-01-04 11:02:14 -0700 |
| commit | 80b07dfa158bb093cc93e602363655b62ae595f8 (patch) | |
| tree | 4e92af37909c07e64f41cbf73b2ea8e68e875ef0 /rust/src/symbol.rs | |
| parent | 7c98724a614550e37e5a33805e13179c87363b91 (diff) | |
Support function recognizers in Rust architecture plugins
Diffstat (limited to 'rust/src/symbol.rs')
| -rw-r--r-- | rust/src/symbol.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<Symbol> { + unsafe { + let res = BNImportedFunctionFromImportAddressSymbol(sym.handle, addr); + Symbol::ref_from_raw(res) + } + } } unsafe impl Send for Symbol {} |
