diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-08 13:17:30 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-08 13:21:48 -0400 |
| commit | a45466fc3227c615c72e77eb7368d7e83220b325 (patch) | |
| tree | 7a1060a6e98a0faa6fe81324553f65f4cafdbfed /view/sharedcache/core/ObjC.h | |
| parent | a6c5c22f08032374481aa060b59ef3492d124200 (diff) | |
Remove notion of image name from objective-c processor
This made the macho objective-c processor aware of images and was passed around everywhere, instead we have an overridable section getter that gives the control over the section retrieval to the derived processor.
In the case of shared cache this means we can store the image to be processed and then use the header to locate the relevant sections.
Fixes: https://github.com/Vector35/binaryninja-api/issues/6594
Diffstat (limited to 'view/sharedcache/core/ObjC.h')
| -rw-r--r-- | view/sharedcache/core/ObjC.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/view/sharedcache/core/ObjC.h b/view/sharedcache/core/ObjC.h index 81e98f54..f44323d6 100644 --- a/view/sharedcache/core/ObjC.h +++ b/view/sharedcache/core/ObjC.h @@ -58,6 +58,7 @@ namespace DSCObjC { class SharedCacheObjCProcessor : public BinaryNinja::ObjCProcessor { std::optional<uint64_t> m_customRelativeMethodSelectorBase = std::nullopt; + uint64_t m_imageAddress; std::shared_ptr<BinaryNinja::ObjCReader> GetReader() override; @@ -65,8 +66,10 @@ namespace DSCObjC { BinaryNinja::Ref<BinaryNinja::Symbol> GetSymbol(uint64_t address) override; + BinaryNinja::Ref<BinaryNinja::Section> GetSectionWithName(const char *sectionName) override; + public: - SharedCacheObjCProcessor(BinaryNinja::BinaryView* data, bool isBackedByDatabase); + SharedCacheObjCProcessor(BinaryNinja::BinaryView* data, bool isBackedByDatabase, uint64_t imageAddress); uint64_t GetObjCRelativeMethodBaseAddress(BinaryNinja::ObjCReader* reader) override; }; |
