summaryrefslogtreecommitdiff
path: root/objectivec/objc.h
diff options
context:
space:
mode:
authorMark Rowe <mrowe@bdash.net.nz>2025-05-15 22:15:26 -0700
committerkat <kat@vector35.com>2025-05-30 11:51:34 -0400
commitfa8ecc11840135ae2050b8af16373d3e3ffeebbc (patch)
tree0b953abe683e83cf8c737439b2b02c5314d8b34e /objectivec/objc.h
parent85d51eeefdca18ec9efe8c4b85d9e5b457ad9e11 (diff)
[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.
Diffstat (limited to 'objectivec/objc.h')
-rw-r--r--objectivec/objc.h2
1 files changed, 2 insertions, 0 deletions
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<std::string> ClassNameForTargetOfPointerAt(ObjCReader* reader, uint64_t offset);
+
void PostProcessObjCSections(ObjCReader* reader);
protected: