Skip to content

[RuntimeDyld][ELF][AArch64] Fix resolveAArch64ShortBranch. #8762

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

Conversation

al45tair
Copy link

@al45tair al45tair commented May 15, 2024

We don't know the load addresses when this function is called, so it shouldn't be trying to use them to determine whether or not the branch is short. Notably, this will fail in the case where the code is being loaded into a target in such a way that the section offsets differ between the process generating the code and the target process.

rdar://127673408

We don't know the load addresses when this function is called, so it
shouldn't be trying to use them to determine whether or not the branch
is short.  Notably, this will fail in the case where the code is being
loaded into a target in such a way that the section offsets differ
between the process generating the code and the target process.
@al45tair
Copy link
Author

@swift-ci Please test

@al45tair
Copy link
Author

This is a cherry pick of llvm#92245.

We mustn't use direct branches for cross-section branches, because doing
so will result in problems if the sections aren't loaded at the same
offsets in the target process as in the host process.

rdar://127673408
@al45tair
Copy link
Author

@swift-ci Please test

@adrian-prantl adrian-prantl merged commit 097668b into swiftlang:stable/20230725 May 16, 2024
3 checks passed
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