-
-
Notifications
You must be signed in to change notification settings - Fork 14.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
binutils: fix an error handling bug in the Gold linker #101666
base: staging
Are you sure you want to change the base?
Conversation
…nking on musl with some filesystems
It may also be reasonable to simply go through and disable gold on musl. It's alleged that it's poorly maintained upstream, with Google's interest shifted to lld, and there do seem to be other issues with it. In combination with #101606, this fixes building multiple versions of llvm, but I was also able to fix their builds by disabling the gold plugin. This approach would not require the same mass rebuilding that fixing this bug in binutils does. Testing this, I found that ld.gold and ld.bfd differ in handling -static-pie. ld.gold appears to take -static to override -pie, while ld.bfd does not, requiring -static-pie. ld.gold throws an error for -static-pie, so the combination of these two changes could create a problem for pkgsStatic. |
@utsl42 Can you resolve the merge conflict? |
Please do not merge the target branch into PRs and rebase and resolve the merge conflict. |
@ofborg eval |
Have we tried upstreaming this fix? If so, it would probably be good to link to that effort in a comment, so we know when the patch can be removed. |
@utsl42 please fix the merge conflict. |
I marked this as stale due to inactivity. → More info |
Motivation for this change
Fixes #101490, a bug found in gold error handling, that causes gold to fail to link at all if built for musl, and the filesystem used doesn't support
fallocate
. (ZFS, for example.)Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)