Skip to content

[Runtime] Use dyld SPI for getting macho sections when available. #64003

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

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Mar 1, 2023

When available, use objc_addLoadImageFunc2 and _dyld_register_func_for_add_image to look up mach-o sections instead of using getsectiondata. When not available, we fall back to objc_addLoadImageFunc or _dyld_register_func_for_add_image and getsectiondata as before.

rdar://51760462

@mikeash mikeash requested review from al45tair and Azoy March 1, 2023 19:10
@mikeash
Copy link
Contributor Author

mikeash commented Mar 1, 2023

@Azoy This might collide with your #63955.

@mikeash
Copy link
Contributor Author

mikeash commented Mar 1, 2023

@swift-ci please test

When available, use objc_addLoadImageFunc2 and _dyld_register_func_for_add_image to look up mach-o sections instead of using getsectiondata. When not available, we fall back to objc_addLoadImageFunc or _dyld_register_func_for_add_image and getsectiondata as before.

rdar://51760462
@mikeash mikeash force-pushed the getsectiondata-spi branch from e303c22 to 19d86e8 Compare March 1, 2023 21:06
@mikeash
Copy link
Contributor Author

mikeash commented Mar 1, 2023

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Mar 2, 2023

Merging. @Azoy sorry if this causes conflicts in your PR, please ping me if I can assist there.

@mikeash mikeash merged commit 360c6d1 into swiftlang:main Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants