diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-08 14:16:05 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-08 14:16:16 -0400 |
| commit | 0f26e9236d52e5e2f0a8e64114d954a516cbeb95 (patch) | |
| tree | 3f011a89ae1f486eec1641a5c01a9dfc392086ba /view/sharedcache/core/MachOProcessor.cpp | |
| parent | a45466fc3227c615c72e77eb7368d7e83220b325 (diff) | |
[SharedCache] Apply demangled names and types more broadly
Fixes the case of stub functions being applied with mangled names.
Diffstat (limited to 'view/sharedcache/core/MachOProcessor.cpp')
| -rw-r--r-- | view/sharedcache/core/MachOProcessor.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/view/sharedcache/core/MachOProcessor.cpp b/view/sharedcache/core/MachOProcessor.cpp index 7f3da817..fdb56516 100644 --- a/view/sharedcache/core/MachOProcessor.cpp +++ b/view/sharedcache/core/MachOProcessor.cpp @@ -62,7 +62,10 @@ void SharedCacheMachOProcessor::ApplyHeader(SharedCacheMachOHeader& header) // NOTE: This table is read relative to the link edit segment file base. const auto symbols = header.ReadSymbolTable(*m_view, *m_vm); for (const auto& sym : symbols) - ApplySymbol(m_view, typeLib, sym.ToBNSymbol(*m_view)); + { + auto [symbol, symbolType] = sym.GetBNSymbolAndType(*m_view); + ApplySymbol(m_view, typeLib, symbol, symbolType); + } } // Apply symbols from export trie. @@ -72,7 +75,10 @@ void SharedCacheMachOProcessor::ApplyHeader(SharedCacheMachOHeader& header) // TODO: Remove this and use the m_symbols in the cache? const auto exportSymbols = header.ReadExportSymbolTrie(*m_vm); for (const auto& sym : exportSymbols) - ApplySymbol(m_view, typeLib, sym.ToBNSymbol(*m_view)); + { + auto [symbol, symbolType] = sym.GetBNSymbolAndType(*m_view); + ApplySymbol(m_view, typeLib, symbol, symbolType); + } } m_view->EndBulkModifySymbols(); } |
