From 44e415514493ec30bb4066e8d2224be032ee8308 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Tue, 8 Jul 2025 17:35:35 -0700 Subject: [MachO] Treat a binary as containing Objective-C metadata if it has __objc_stubs `__objc_stubs` is not technically Objective-C metadata, but binaries containing Objective-C stubs need the same processing. `MachoView` was previously only enabling the Objective-C workflow if it thinks there is type metadata. The same criteria was used to determine whether to process Objective-C metadata via `MachoObjCProcessor`. This meant binaries with `__objc_stubs` but no Objective-C type metadata were not running the Objective-C workflow, preventing stub functions from being inlined during analysis. --- view/macho/objc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/macho/objc.cpp') diff --git a/view/macho/objc.cpp b/view/macho/objc.cpp index 10fa34e9..a624bcf2 100644 --- a/view/macho/objc.cpp +++ b/view/macho/objc.cpp @@ -83,8 +83,8 @@ std::shared_ptr MachoObjCProcessor::GetReader() bool MachoObjCProcessor::ViewHasObjCMetadata(BinaryView* data) { - return (data->GetSectionByName("__objc_classlist") || data->GetSectionByName("__objc_catlist") - || data->GetSectionByName("__objc_protolist")); + return data->GetSectionByName("__objc_classlist") || data->GetSectionByName("__objc_catlist") + || data->GetSectionByName("__objc_protolist") || data->GetSectionByName("__objc_stubs"); } MachoObjCProcessor::MachoObjCProcessor(BinaryView* data) : -- cgit v1.3.1