Repository navigation
llvmPackages_{18,19,20,21}.lld: initialize Symbol fields in the constructor - #568680
Merged
Merged
Conversation
…structor lld relies on a memset that GCC 16 is allowed to optimize away, leaving some symbol fields uninitialized. With lld 21, this makes `ld -r` emit broken section symbols, which breaks LTO kernel module builds (see ClangBuiltLinux/linux#2162). 18 through 20 should have the same bug, but I haven't seen it break there myself. This backports llvm/llvm-project@4d5dffb594 and llvm/llvm-project@070e505ce2, which landed in 22.1.8.
nixpkgs-ci
Bot
requested review from
a team and
andir
and removed request for
a team
September 30, 2026 14:49
peterwaller-arm
approved these changes
Sep 30, 2026
peterwaller-arm
left a comment
Member
There was a problem hiding this comment.
LGTM.
I've done my best to verify:
- The patch faithfully represents what is upstream.
- The patches apply and I can build those TUs (whole builds and tests not done).
- It makes sense to want to backport this.
I didn't spot any obvious wiring mistakes.
Member
|
This may be related to the kernel compilation failure,
|
zowoq
approved these changes
Oct 5, 2026
zzzsyyy
approved these changes
Oct 7, 2026
4 tasks done
insipx
pushed a commit
to insipx/nixpkgs
that referenced
this pull request
Oct 8, 2026
kixelated
added a commit
to moq-dev/moq
that referenced
this pull request
Oct 13, 2026
GCC 16 miscompiles nixpkgs' lld 21, so zig's relocatable link writes undefined section symbols into aws-lc's bcm.o. Fixed upstream by NixOS/nixpkgs#568680; add a quest waiting on it to reach nixpkgs-unstable and shrink release-link to the bump. Co-Authored-By: Claude Opus 5.5 <[email protected]>
4 tasks done
42 of 54 tasks
This was referenced Oct 19, 2026
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lld relies on a memset that GCC 16 is allowed to optimize away, leaving
some symbol fields uninitialized. With lld 21, this makes
ld -remitbroken section symbols, which breaks LTO kernel module builds
(see ClangBuiltLinux/linux#2162). 18 through 20 should have the same
bug, but I haven't seen it break there myself.
This backports llvm/llvm-project@4d5dffb594 and
llvm/llvm-project@070e505ce2, which landed in 22.1.8.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.