summaryrefslogtreecommitdiff
path: root/view/sharedcache/workflow/SharedCacheWorkflow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'view/sharedcache/workflow/SharedCacheWorkflow.cpp')
-rw-r--r--view/sharedcache/workflow/SharedCacheWorkflow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/view/sharedcache/workflow/SharedCacheWorkflow.cpp b/view/sharedcache/workflow/SharedCacheWorkflow.cpp
index 7dde4089..186ba85a 100644
--- a/view/sharedcache/workflow/SharedCacheWorkflow.cpp
+++ b/view/sharedcache/workflow/SharedCacheWorkflow.cpp
@@ -220,6 +220,15 @@ void AnalyzeStubFunction(Ref<Function> func, Ref<MediumLevelILFunction> mlil, Sh
void AnalyzeStandardFunction(Ref<Function> func, Ref<MediumLevelILFunction> mlil, SharedCacheController& controller)
{
auto view = func->GetView();
+ auto identifyUnmappedSymbol = [&](uint64_t symbolAddr) {
+ // Skip if already loaded.
+ if (view->IsValidOffset(symbolAddr))
+ return false;
+ const auto symbol = controller.GetSymbolAt(symbolAddr);
+ view->DefineAutoSymbol(symbol->GetBNSymbol(*view));
+ return true;
+ };
+
auto loadStubIslandRegion = [&](uint64_t regionAddr) {
// Skip if already loaded.
if (view->IsValidOffset(regionAddr))
@@ -239,6 +248,7 @@ void AnalyzeStandardFunction(Ref<Function> func, Ref<MediumLevelILFunction> mlil
{
case MLIL_CONST_PTR:
loadStubIslandRegion(expr.GetConstant<MLIL_CONST_PTR>());
+ identifyUnmappedSymbol(expr.GetConstant<MLIL_CONST_PTR>());
break;
default:
break;