Skip to content
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

[BOLT] Detect incorrect update of dynamic relocations #89681

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

maksfb
Copy link
Contributor

@maksfb maksfb commented Apr 22, 2024

When we rewrite dynamic relocations, there could be cases where they reference code locations inside functions that were rewritten. When this happens, we need to precisely map old address to a new one. Until we can reliably perform the mapping, detect such condition and issue an error refusing to write a broken binary.

When we rewrite dynamic relocations, there could be cases where they
reference code locations inside functions that were rewritten. When this
happens, we need to precisely map old address to a new one. Until we can
reliably perform the mapping, detect such condition and issue an error
refusing to write a broken binary.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's XFAIL it instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even with a fix this test will fail. Need a better test case or fix this one once the support is there.

@maksfb maksfb merged commit 418e4b0 into llvm:main Apr 24, 2024
6 checks passed
aaupov added a commit to rafaelauler/bolt-tests that referenced this pull request Apr 26, 2024
llvm/llvm-project#89681 added a failsafe check for rewriting certain dynamic relocations, which trigger in python test binaries. Skip the faulty functions.
@maksfb maksfb deleted the gh-detect-bad-dynrel branch April 30, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants