-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
[JITLink] fix i686 R_386_32 relocation value #111091
Conversation
Thanks very much at @vtjnash! Do you think you could add a test with a non-zero addend in |
202a0a1
to
4731ac2
Compare
Yes, thanks for pointing out where the tests are. I fixed all of the other relocations too, since most of them were similarly wrong. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
4731ac2
to
0abd57d
Compare
Most relocations involve adding the value at the location with a value taken from elsewhere. Most of them were hard coded instead. Assume signed, since the math is the same either way after truncation, but this seems more likely to give reasonable looking intermediate results.
0abd57d
to
0d56a9f
Compare
bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great stuff. Thanks very much @vtjnash!
Thanks for taking the time to add those test cases too.
I don't actually have merge rights anymore, so you will need to land it for me |
@vtjnash Thanks for the heads up. Merged. :) |
Fix R_386_32 and other relocations by correcting Addend computations.
Fix R_386_32 and other relocations by correcting Addend computations.
Fix R_386_32 and other relocations by correcting Addend computations.
Fix R_386_32 and other relocations by correcting Addend computations. (cherry picked from commit 5716f83)
Fix R_386_32 and other relocations by correcting Addend computations. (cherry picked from commit 5716f83)
My i686 builds were segfaulting when trying to enable JITLink, and I traced it back to an incorrect Addend computation here. Most relocations involve adding the value at the location with a value taken from elsewhere. This one was missing the addend taken from the location, but other relocations may be missing this too?
@lhames @llvm/issue-subscribers-julialang