diff options
| author | Mark Rowe <mark@vector35.com> | 2025-07-08 17:35:35 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-07-09 07:59:54 -0700 |
| commit | 44e415514493ec30bb4066e8d2224be032ee8308 (patch) | |
| tree | 05bd46934c5374ee56ea940b955cb795120143fa /view | |
| parent | 6cb671483fe02f0e9ab20bab189101d1cc8210a1 (diff) | |
[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.
Diffstat (limited to 'view')
| -rw-r--r-- | view/macho/objc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<ObjCReader> 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) : |
