Skip to content

Alt mechanism to find the first loadable seg in a Mach-O binary #3941

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

Conversation

jasonmolenda
Copy link

Alt mechanism to find the first loadable seg in a Mach-O binary

ObjectFileMachO, for a couple of special binaries at the initial
launch, needs to find segment load addresses before the Target's
SectionLoadList has been initialized. The calculation to find
the first segment, which is at the same address as the mach header,
was not correct if the binary was in the Darwin shared cache.
Update the logic to handle that case.

Differential Revision: https://reviews.llvm.org/D119602
rdar://88802629

(cherry picked from commit 4a39436)

ObjectFileMachO, for a couple of special binaries at the initial
launch, needs to find segment load addresses before the Target's
SectionLoadList has been initialized. The calculation to find
the first segment, which is at the same address as the mach header,
was not correct if the binary was in the Darwin shared cache.
Update the logic to handle that case.

Differential Revision: https://reviews.llvm.org/D119602
rdar://88802629

(cherry picked from commit 4a39436)
@jasonmolenda
Copy link
Author

@swift-ci please test

@JDevlieghere
Copy link

@swift-ci test macOS

1 similar comment
@JDevlieghere
Copy link

@swift-ci test macOS

@JDevlieghere JDevlieghere merged commit aeb3081 into swiftlang:stable/20211026 Feb 15, 2022
@jasonmolenda jasonmolenda deleted the r88802629-manual-load-address-computation-fix branch February 15, 2022 19:32
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.

2 participants