summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/MachO.cpp
AgeCommit message (Collapse)Author
2026-02-24[DSC] Simplify file mapping to fix intermittent unrelocated pointersMark Rowe
The `FileAccessorCache`'s LRU eviction could discard a file's mapped data after slide info had already been applied to it. Future accesses to the file produced a fresh mapping, but failed to reapply the slide info. This could result in pointers not correctly being slid, such as in https://github.com/Vector35/binaryninja-api/issues/7689. The LRU cache existed to stay within OS file descriptor limits, since the old `MappedFile` held its fd open for the lifetime of the mapping. There's no real reason for it to hold the file descriptor open like this. Closing it after `mmap` is sufficient to avoid the file descriptor limits. `MappedFileRegion` replaces the combination of `FileAccessorCache`, `WeakFileAccessor`, and `MappedFileAccessor`. It closes the fd immediately after mmap, so all files can stay mapped without consuming descriptors, making the cache unnecessary. `MappedFileRegion` is owned directly by the `CacheEntry` for its full lifetime. Slide info is applied exactly once to each `MappedFileRegion`.
2026-02-13[DSC] Correctly mark symbols as having local, global, or weak bindingMark Rowe
2025-12-04[DSC] Fix unhandled exception when opening secondary cache file with ↵Mason Reed
unbacked regions Fixes https://github.com/Vector35/binaryninja-api/issues/7724
2025-07-28Improve and migrate to fmt logging functions in Mach-O/KernelCache/SharedCachekat
2025-05-13Rework Export Trie parser to avoid recursion, improve error checkingkat
2025-04-14[SharedCache] Misc cleanupMason Reed
- Make `SharedCache::m_entries` a simple std::vector we never lookup based off the entry ID - Remove some old comments - Rename some old variables so that they are accurate - Fix compiler warnings - Remove some unneeded copying
2025-04-14[SharedCache] Apply .symbols file information when applying an imageMason Reed
This improves symbol recovery drastically on newer shared caches Related PR: https://github.com/Vector35/binaryninja-api/pull/6210
2025-04-07[SharedCache] Include segment in image section nameMason Reed
This removes some section name collisions where a section name is in two separate image segments. See https://github.com/Vector35/binaryninja-api/pull/6454 for more information. Co-Authored-By: WeiN76LQh <WeiN76LQh@github.com>
2025-04-06[SharedCache] Prevent some unneeded copies when processingMason Reed
Also swapped out CacheEntry::m_images to a vector as its never actually used as a lookup
2025-04-02[SharedCache] Refactor Shared CacheMason Reed
In absence of a better name, this commit refactors the shared cache code.