Skip to content

Parsing of __init_offsets section in MachO #6106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mostobriv opened this issue Nov 8, 2024 · 0 comments
Open

Parsing of __init_offsets section in MachO #6106

mostobriv opened this issue Nov 8, 2024 · 0 comments
Assignees
Labels
Effort: Trivial Issue should take < 1 day File Format: Mach-O Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality

Comments

@mostobriv
Copy link

What is the feature you'd like to have?
As for some time apple presented new ways to store global constructors pointers, modern compilers used to add the sections __init_offsets (pointers there stored as 32-bit RVA) instead of an old one __mod_init_func (pointers there stored as raw pointers), i think BN should be able to parse it as well and use it within its analysis.

Is your feature request related to a problem?
Not much, just simple enhancement

Are any alternative solutions acceptable?
It can be easily done with scripting yeah.

Additional Information:
There is dyld code, related to getting initialisers from this section:
https://github.com./apple-oss-distributions/dyld/blob/65bbeed63cec73f313b1d636e63f243964725a9d/cache-builder/OptimizerLinkedit.cpp#L370-L377

@0cyn 0cyn self-assigned this Nov 8, 2024
@0cyn 0cyn added File Format: Mach-O Impact: Low Issue is a papercut or has a good, supported workaround Effort: Trivial Issue should take < 1 day labels Nov 8, 2024
@plafosse plafosse added the Type: Enhancement Issue is a small enhancement to existing functionality label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort: Trivial Issue should take < 1 day File Format: Mach-O Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants