SIGN IN SIGN UP

[Mach-O] Improve how section types are identified

1. A section's `flags` are masked with `SECTION_TYPE` before being
   compared. This prevents misclassifying a section when its low bits
   are shared with other section types.
2. `__mod_init_func` and `__init_offsets` are identified by section type
   flags, rather than by name. There's no documented reason why these
   were being matched by name.
3. A fallback is added to detect `__got` sections by name. This is
   necessary as some kext bundles that have their `__got` sections as
   `S_REGULAR` rather than `S_NON_LAZY_SYMBOL_POINTERS`. This fixes
   https://github.com/Vector35/binaryninja-api/issues/7891.

Thanks to @WHW0x455 for these fixes.
W
wanghaiwei committed
14a8c76b46354826d79431168749ed81963db034
Parent: 3afe0f1
Committed by Mark Rowe <mark@vector35.com> on 1/22/2026, 10:10:04 PM