-
Notifications
You must be signed in to change notification settings - Fork 13.5k
lld incorrectly calculates the maximum range of R_HEX_B22_PCREL relocation #116798
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
Comments
@llvm/issue-subscribers-lld-elf Author: Brian Cain (androm3da)
When building the linux kernel, we see the following link error:
This issue was triggered by changes in layout but it uncovered an error in the way lld calculates the range of this relocation. See also https://lore.kernel.org/linux-hexagon/20241114171834.GA1956005@thelio-3990X |
@llvm/issue-subscribers-backend-hexagon Author: Brian Cain (androm3da)
When building the linux kernel, we see the following link error:
This issue was triggered by changes in layout but it uncovered an error in the way lld calculates the range of this relocation. See also https://lore.kernel.org/linux-hexagon/20241114171834.GA1956005@thelio-3990X |
This is fixed by #115925 - so we can cherry-pick it once it lands. |
/cherry-pick 64e3466 |
Failed to cherry-pick: 64e3466 https://github.com/llvm/llvm-project/actions/runs/11916300231 Please manually backport the fix and push it to your github fork. Once this is done, please create a pull request |
@androm3da does this look like the same issue?
I get a bunch of relocation errors of this sort when linking Zig's compiler-rt tests. |
Yes it does. Note that even after this is fixed there's a (small) chance for relocations to be too far apart (if the call site is not extended and the executable is fairly large). But: #111217 should address that when it lands. |
This has been fixed in |
@androm3da building Zig's std tests (fairly large binary at 69M), we now get lots of:
I'm wondering if we might be hitting this bug again, or if we're just running into an actual toolchain limitation here. |
It's the latter. I have not gotten around to finishing the remaining work for #111217, sadly. Hopefully we can resurrect that one and polish off the remaining work. |
When building the linux kernel, we see the following link error:
This issue was triggered by changes in layout but it uncovered an error in the way lld calculates the range of this relocation.
See also https://lore.kernel.org/linux-hexagon/20241114171834.GA1956005@thelio-3990X
The text was updated successfully, but these errors were encountered: