From fa8ecc11840135ae2050b8af16373d3e3ffeebbc Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Thu, 15 May 2025 22:15:26 -0700 Subject: [ObjC] Fix another case where a category's class name was not being resolved Handle the case where the `class` field of the category is a direct reference to an external symbol via a bind fixup. In that case, the pointer's value when read from the view is 0. To determine the class name it is necessary to look up the relocation for the pointer's address and parse the class name from the symbol's name. --- objectivec/objc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'objectivec/objc.h') diff --git a/objectivec/objc.h b/objectivec/objc.h index 9aeb159a..1cff9401 100644 --- a/objectivec/objc.h +++ b/objectivec/objc.h @@ -313,6 +313,8 @@ namespace BinaryNinja { bool ApplyMethodType(Class& cls, Method& method, bool isInstanceMethod); void ApplyMethodTypes(Class& cls); + std::optional ClassNameForTargetOfPointerAt(ObjCReader* reader, uint64_t offset); + void PostProcessObjCSections(ObjCReader* reader); protected: -- cgit v1.3.1