Skip to content

Section semantics are not being respected #6526

@WeiN76LQh

Description

@WeiN76LQh

Version and Platform (required):

  • Binary Ninja Version: 4.3.7098-dev (7f4b22d9)
  • OS: macOS
  • OS Version: 15.2
  • CPU Architecture: M1

Bug Description:
I'm seeing functions being created in data sections. For example libobjc.A.dylib::__DATA.__common in the DSC is a section with read/write semantics in a segment with rw- permissions, but there's a function being created at the start of it.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Load a copy of DYLD Shared Cache (in my case it was one from iOS 18.1.1).
  2. Load the image libobjc.A.dylib.
  3. Go to the section libobjc.A.dylib::__common. Without PR [SharedCache] Avoid data memory region name conflicts & reduce section naming ones #6454 the section might be different due to there being multiple with the name libobjc.A.dylib::__common but the problem occurs in all of them.
  4. Observe a function called _objc_indexed_classes at the start of the section.

Expected Behavior:
Functions should not be being created in data only sections.

Screenshots/Video Recording:

Image

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions