From 833375c0199d4e7c2555e6e9f14862ddc3ca120c Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 6 Apr 2025 21:00:43 -0400 Subject: [SharedCache] Prevent some unneeded copies when processing Also swapped out CacheEntry::m_images to a vector as its never actually used as a lookup --- view/sharedcache/core/MachO.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'view/sharedcache/core/MachO.h') diff --git a/view/sharedcache/core/MachO.h b/view/sharedcache/core/MachO.h index 37b82915..8508edbf 100644 --- a/view/sharedcache/core/MachO.h +++ b/view/sharedcache/core/MachO.h @@ -64,8 +64,9 @@ struct SharedCacheMachOHeader // TODO: Replace view with address size? std::vector ReadSymbolTable(BinaryNinja::BinaryView& view, VirtualMemory& vm) const; - std::optional AddExportTerminalSymbol( - const std::string& symbolName, const uint8_t* current, const uint8_t* end) const; + bool AddExportTerminalSymbol( + std::vector& symbols, const std::string& symbolName, const uint8_t* current, + const uint8_t* end) const; bool ProcessLinkEditTrie(std::vector& symbols, const std::string& currentText, const uint8_t* begin, const uint8_t* current, const uint8_t* end) const; -- cgit v1.3.1