-
Notifications
You must be signed in to change notification settings - Fork 18.4k
cmd/link: use gold on ARM/ARM64 only if gold is available #49748
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
Conversation
COPY relocation handling on ARM/ARM64 has been fixed in recent versions of the GNU linker. This switches to gold only if gold is available. Fixes golang#22040.
This PR (HEAD: 5ccf9f4) has been imported to Gerrit for code review.
Please visit https://go-review.googlesource.com/c/go/+/366279 to see it.
Tip: You can toggle comments from me using the comments
slash command (e.g. /comments off
)
See the Wiki page for more info
Message from Go Bot:
Patch Set 1:
Congratulations on opening your first change. Thank you for your contribution!
Next steps:
A maintainer will review your change and provide feedback. See
https://golang.org/doc/contribute.html#review for more info and tips to get your
patch through code review.
Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.
During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://golang.org/s/release
for more details.
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Than McIntosh:
Patch Set 1: Run-TryBot+1 Trust+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Go Bot:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Go Bot:
Patch Set 1: TryBot-Result+1
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Cherry Mui:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Than McIntosh:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Cherry Mui:
Patch Set 1:
(2 comments)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit 0ac57b1)
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit eac2e91)
Message from Alex Xu:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Alex Xu:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Message from Jeffery To:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Message from Alex Xu:
Patch Set 1:
(1 comment)
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Message from Cherry Mui:
Patch Set 1: Code-Review+2
Please don’t reply on this GitHub thread. Visit golang.org/cl/366279.
After addressing review feedback, remember to publish your drafts!
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
williamh
commented
Feb 13, 2023
Hi, I am the go package maintainer on Gentoo linux.
I have a user who is requesting that I add a distro-specific patch to go to completely disable gold.
I'm not really a fan of distro-specific patching, so I wanted to bring this to your attention.
this is our bug.
Let me know what you think.
William
Upstream has updated the Go compiler to not use gold when building for arm, and is waiting for a fix to binutils (released in 2.41) before doing the same for aarch64.[1] Based on the above, it does not appear that golang/go#49748 will be merged. This removes the patch from that pull request. [1]: golang/go#22040 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Upstream has updated the Go compiler to not use gold when building for arm, and is waiting for a fix to binutils (released in 2.41) before doing the same for aarch64.[1] Based on the above, it does not appear that golang/go#49748 will be merged. This removes the patch from that pull request. [1]: golang/go#22040 Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit a80af7e)
Upstream has updated the Go compiler to not use gold when building for arm, and is waiting for a fix to binutils (released in 2.41) before doing the same for aarch64.[1] Based on the above, it does not appear that golang/go#49748 will be merged. This removes the patch from that pull request. [1]: golang/go#22040 Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit a80af7e)
Upstream has updated the Go compiler to not use gold when building for arm, and is waiting for a fix to binutils (released in 2.41) before doing the same for aarch64.[1] Based on the above, it does not appear that golang/go#49748 will be merged. This removes the patch from that pull request. [1]: golang/go#22040 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Upstream has updated the Go compiler to not use gold when building for arm, and is waiting for a fix to binutils (released in 2.41) before doing the same for aarch64.[1] Based on the above, it does not appear that golang/go#49748 will be merged. This removes the patch from that pull request. [1]: golang/go#22040 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Upstream has updated the Go compiler to not use gold when building for arm, and is waiting for a fix to binutils (released in 2.41) before doing the same for aarch64.[1] Based on the above, it does not appear that golang/go#49748 will be merged. This removes the patch from that pull request. [1]: golang/go#22040 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Includes fixes for: * CVE-2021-44716: unbounded growth of HTTP/2 header canonicalization cache * CVE-2021-44717: syscall.ForkExec error can close file descriptor 0 Added patches: * 001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch: golang/go#49748 backported for Go 1.17, this removes the requirement for the gold linker when building Go programs that use Go plugins on arm/arm64 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Upstream has updated the Go compiler to not use gold when building for arm, and is waiting for a fix to binutils (released in 2.41) before doing the same for aarch64.[1] Based on the above, it does not appear that golang/go#49748 will be merged. This removes the patch from that pull request. [1]: golang/go#22040 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
solskogen
commented
Aug 18, 2025
any chance this PR can get some love? :)
@solskogen the last update is CI failing and the reviewer asking for it to be rebased.
You look like have a lot of love to give, you could clone the branch and resubmit it after having doing so ❇️.
I think the consensus is that https://go.dev/cl/391115 is the preferred solution - please read the comment history in #22040 for more details.
COPY relocation handling on ARM/ARM64 has been fixed in recent versions
of the GNU linker. This switches to gold only if gold is available.
Fixes #22040.