From 1f69623fe79b56093503dfacb3577c84f0be243c Mon Sep 17 00:00:00 2001 From: dbenoit Date: Wed, 13 May 2026 11:00:58 -0400 Subject: [PATCH] Remove ld.bfd patch for aarch64 Fixed upstream via https://go-review.googlesource.com/c/go/+/740480 Related: RHEL-175604 --- 0006-Default-to-ld.bfd-on-ARM64.patch | 46 --------------------------- golang.spec | 1 - 2 files changed, 47 deletions(-) delete mode 100644 0006-Default-to-ld.bfd-on-ARM64.patch diff --git a/0006-Default-to-ld.bfd-on-ARM64.patch b/0006-Default-to-ld.bfd-on-ARM64.patch deleted file mode 100644 index 369b4e6..0000000 --- a/0006-Default-to-ld.bfd-on-ARM64.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 46ec67413008607e2150e3395668e54e538c5b6b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= -Date: Wed, 19 Jun 2024 10:18:58 +0200 -Subject: [PATCH] Default to ld.bfd on ARM64 - ---- - src/cmd/link/internal/ld/lib.go | 20 +++++++------------- - 1 file changed, 7 insertions(+), 13 deletions(-) - -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index eab74dc328..b401f58727 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -1620,22 +1620,16 @@ func (ctxt *Link) hostlink() { - } - - if ctxt.Arch.InFamily(sys.ARM64) && buildcfg.GOOS == "linux" { -- // On ARM64, the GNU linker will fail with -- // -znocopyreloc if it thinks a COPY relocation is -- // required. Switch to gold. -- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962 -- // https://go.dev/issue/22040 -- altLinker = "gold" -- -- // If gold is not installed, gcc will silently switch -- // back to ld.bfd. So we parse the version information -- // and provide a useful error if gold is missing. -+ // Use ld.bfd as the default linker -+ altLinker = "bfd" -+ -+ // Provide a useful error if ld.bfd is missing - name, args := flagExtld[0], flagExtld[1:] -- args = append(args, "-fuse-ld=gold", "-Wl,--version") -+ args = append(args, "-fuse-ld=bfd", "-Wl,--version") - cmd := exec.Command(name, args...) - if out, err := cmd.CombinedOutput(); err == nil { -- if !bytes.Contains(out, []byte("GNU gold")) { -- log.Fatalf("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s", out) -+ if !bytes.Contains(out, []byte("GNU ld")) { -+ log.Fatalf("ARM64 external linker must be ld.bfd, but is not: %s", out) - } - } - } --- -2.45.1 - diff --git a/golang.spec b/golang.spec index 8b2734a..f84a4a0 100644 --- a/golang.spec +++ b/golang.spec @@ -197,7 +197,6 @@ Requires: %{name}-race = %{version}-%{release} %endif Patch1: 0001-Modify-go.env.patch -Patch6: 0006-Default-to-ld.bfd-on-ARM64.patch # Related: https://sourceware.org/bugzilla/show_bug.cgi?id=33204 Patch7: revert_dwarf5.patch Patch8: skip-TestTerminalSignal-in-container.patch