summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/src/lib.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/riscv/src/lib.rs b/arch/riscv/src/lib.rs
index e619df2a..725177ca 100644
--- a/arch/riscv/src/lib.rs
+++ b/arch/riscv/src/lib.rs
@@ -2865,9 +2865,17 @@ impl FunctionRecognizer for RiscVELFPLTRecognizer {
let func_sym =
Symbol::imported_function_from_import_address_symbol(sym.as_ref(), func.start());
+
bv.define_auto_symbol(func_sym.as_ref());
- func.apply_imported_types(func_sym.as_ref(), None);
- true
+ for ext_sym in &bv.symbols_by_name(func_sym.raw_name()) {
+ if ext_sym.sym_type() == SymbolType::External {
+ if let Some(var) = bv.data_variable_at_address(ext_sym.address()) {
+ func.apply_imported_types(func_sym.as_ref(), Some(var.t()));
+ return true;
+ }
+ }
+ }
+ false
}
}