Skip to content

Types for objc_retain_xN / objc_release_xN in the libobjc type library should include their custom calling conventions #8032

@bdash

Description

@bdash

Version and Platform (required):

  • Binary Ninja Version: 5.3.9301-dev Ultimate, 855e811
  • OS: macos
  • OS Version: 26.3.1
  • CPU Architecture: arm64

Bug Description:

>>> bv.import_library_object('_objc_release_x20')
<type: immutable:FunctionTypeClass 'void()'>
>>> bv.import_library_object('_objc_release_x20').calling_convention

Expected Behavior:
These functions should:

  1. Have the correct signature: id _objc_release_x20(id).
  2. Specify the custom calling convention (apple-arm64-objc-fast-arc-20) to make explicit that the argument is not passed via x0.

Additional Information:
Both the shared cache and Mach-O views have to work around this at present by recognizing imports of these functions and manually fixing up the signature and calling convention.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions