diff options
Diffstat (limited to 'arch/mips/arch_mips.cpp')
| -rw-r--r-- | arch/mips/arch_mips.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/arch/mips/arch_mips.cpp b/arch/mips/arch_mips.cpp index 50ad0f75..1fa6b169 100644 --- a/arch/mips/arch_mips.cpp +++ b/arch/mips/arch_mips.cpp @@ -1747,8 +1747,20 @@ private: Ref<Symbol> funcSym = Symbol::ImportedFunctionFromImportAddressSymbol(sym, func->GetStart()); data->DefineAutoSymbol(funcSym); - func->ApplyImportedTypes(funcSym); - return true; + for (auto& extSym : data->GetSymbolsByName(funcSym->GetRawName())) + { + if (extSym->GetType() == ExternalSymbol) + { + DataVariable var; + if (data->GetDataVariableAtAddress(extSym->GetAddress(), var)) + { + func->ApplyImportedTypes(funcSym, var.type); + } + + return true; + } + } + return false; } @@ -1939,7 +1951,19 @@ private: Ref<Symbol> funcSym = Symbol::ImportedFunctionFromImportAddressSymbol(sym, func->GetStart()); data->DefineAutoSymbol(funcSym); - func->ApplyImportedTypes(funcSym); + for (auto& extSym : data->GetSymbolsByName(funcSym->GetRawName())) + { + if (extSym->GetType() == ExternalSymbol) + { + DataVariable var; + if (data->GetDataVariableAtAddress(extSym->GetAddress(), var)) + { + func->ApplyImportedTypes(funcSym, var.type); + } + + return true; + } + } return true; } |
