From f100fd73dd5b6bec9b9e4c94bcd8476fe280c110 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 08 2021 14:37:47 +0000 Subject: import golang-1.16.5-1.module+el8.5.0+11702+5e79d6f7 --- diff --git a/.gitignore b/.gitignore index 3bed187..8c7047d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/go-go-1.16.4-1-openssl-fips.tar.gz +SOURCES/go-go-1.16.5-1-openssl-fips.tar.gz diff --git a/.golang.metadata b/.golang.metadata index 4c8a30d..e8523a4 100644 --- a/.golang.metadata +++ b/.golang.metadata @@ -1 +1 @@ -1edcf3e54204d79803b3ca8eb84fe6ef2941dad0 SOURCES/go-go-1.16.4-1-openssl-fips.tar.gz +c5b45fc02584bfd427270b9bebbf7d3758b65c44 SOURCES/go-go-1.16.5-1-openssl-fips.tar.gz diff --git a/SOURCES/rhbz1955032.patch b/SOURCES/rhbz1955032.patch deleted file mode 100644 index c7deea7..0000000 --- a/SOURCES/rhbz1955032.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 983dea90c169930e35721232afe39fd4e3fbe4a6 Mon Sep 17 00:00:00 2001 -From: Paul E. Murphy -Date: Tue, 27 Apr 2021 15:05:51 -0500 -Subject: [PATCH] cmd/link: disable plugin support if cgo is disabled - -Functional plugin support requires cgo to be enabled. Disable -it if the environment has disabled cgo. - -This prevents unexpected linker failures when linking large -binaries with cgo disabled which use the plugin package. - -Fixes #45564 - -Change-Id: Ib71f0e089f7373b7b3e3cd53da3612291e7bc473 -Reviewed-on: https://go-review.googlesource.com/c/go/+/314449 -Run-TryBot: Paul Murphy -Reviewed-by: Cherry Zhang -TryBot-Result: Go Bot -Trust: Lynn Boger ---- - -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index adf1669..043bf5a 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -539,7 +539,10 @@ - // up symbol by name may not get expected result. - - iscgo = ctxt.LibraryByPkg["runtime/cgo"] != nil -- ctxt.canUsePlugins = ctxt.LibraryByPkg["plugin"] != nil -+ -+ // Plugins a require cgo support to function. Similarly, plugins may require additional -+ // internal linker support on some platforms which may not be implemented. -+ ctxt.canUsePlugins = ctxt.LibraryByPkg["plugin"] != nil && iscgo - - // We now have enough information to determine the link mode. - determineLinkMode(ctxt) diff --git a/SOURCES/rhbz1956891.patch b/SOURCES/rhbz1956891.patch deleted file mode 100644 index 0d201a3..0000000 --- a/SOURCES/rhbz1956891.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 9ed736ac2a99aa2e7ef7d8bed3b01ca8b20a6f80 Mon Sep 17 00:00:00 2001 -From: Lynn Boger -Date: Thu, 29 Apr 2021 16:07:25 -0500 -Subject: [PATCH] cmd/link/internal: fix use of DynlinkingGo with ppc64le trampolines - -When creating programs with large text sections on ppc64le, -trampolines are needed for calls that are too far; however -they are not created if the code is generated such that the TOC -register r2 is initialized and maintained in the code because -then the external linker can create the trampolines. Previously -the function DynlinkingGo was used to determine this but in the -case where plugins are used, this could return true even though -r2 is not valid. - -To fix this problem I've added a new function r2Valid which returns -true when the build options indicate that the r2 is -initialized and maintained. Because of the ways that -DynlinkingGo is used I wanted to maintain its previous -behavior. - -Fixes #45850 - -Change-Id: I6d902eba6ad41757aa6474948b79acdbd479cb38 -Reviewed-on: https://go-review.googlesource.com/c/go/+/315289 -Trust: Lynn Boger -Run-TryBot: Lynn Boger -Reviewed-by: Cherry Zhang -TryBot-Result: Go Bot ---- - -diff --git a/src/cmd/link/internal/ppc64/asm.go b/src/cmd/link/internal/ppc64/asm.go -index 0638502..b877864 100644 ---- a/src/cmd/link/internal/ppc64/asm.go -+++ b/src/cmd/link/internal/ppc64/asm.go -@@ -651,6 +651,16 @@ - return int64(o2)<<32 | int64(o1) - } - -+// Determine if the code was compiled so that the TOC register R2 is initialized and maintained -+func r2Valid(ctxt *ld.Link) bool { -+ switch ctxt.BuildMode { -+ case ld.BuildModeCArchive, ld.BuildModeCShared, ld.BuildModePIE, ld.BuildModeShared, ld.BuildModePlugin: -+ return true -+ } -+ // -linkshared option -+ return ctxt.IsSharedGoLink() -+} -+ - // resolve direct jump relocation r in s, and add trampoline if necessary - func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) { - -@@ -658,7 +668,7 @@ - // For internal linking, trampolines are always created for long calls. - // For external linking, the linker can insert a call stub to handle a long call, but depends on having the TOC address in - // r2. For those build modes with external linking where the TOC address is not maintained in r2, trampolines must be created. -- if ctxt.IsExternal() && (ctxt.DynlinkingGo() || ctxt.BuildMode == ld.BuildModeCArchive || ctxt.BuildMode == ld.BuildModeCShared || ctxt.BuildMode == ld.BuildModePIE) { -+ if ctxt.IsExternal() && r2Valid(ctxt) { - // No trampolines needed since r2 contains the TOC - return - } -@@ -712,7 +722,7 @@ - } - } - if ldr.SymType(tramp) == 0 { -- if ctxt.DynlinkingGo() || ctxt.BuildMode == ld.BuildModeCArchive || ctxt.BuildMode == ld.BuildModeCShared || ctxt.BuildMode == ld.BuildModePIE { -+ if r2Valid(ctxt) { - // Should have returned for above cases - ctxt.Errorf(s, "unexpected trampoline for shared or dynamic linking") - } else { diff --git a/SPECS/golang.spec b/SPECS/golang.spec index a7fec5c..73f2191 100644 --- a/SPECS/golang.spec +++ b/SPECS/golang.spec @@ -96,12 +96,12 @@ %endif %global go_api 1.16 -%global go_version 1.16.4 +%global go_version 1.16.5 %global pkg_release 1 Name: golang Version: %{go_version} -Release: 3%{?dist} +Release: 1%{?dist} Summary: The Go Programming Language # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain License: BSD and Public Domain @@ -147,18 +147,6 @@ Patch223: golang-1.15-warnCN.patch Patch1939923: skip_test_rhbz1939923.patch -# cmd/link: disable plugin support if cgo is disabled -# Functional plugin support requires cgo to be enabled. Disable -# it if the environment has disabled cgo. -# This prevents unexpected linker failures when linking large -# binaries with cgo disabled which use the plugin package. -# https://go-review.googlesource.com/c/go/+/314449/ -Patch1955032: rhbz1955032.patch - -# cmd/link/internal: fix use of DynlinkingGo with ppc64le trampolines -# https://go-review.googlesource.com/c/go/+/315289 -Patch1956891: rhbz1956891.patch - # Fix FIPS mode memory leaks Patch1951877: fix-crypto-memory-leaks.patch @@ -259,10 +247,6 @@ Requires: %{name} = %{version}-%{release} %patch1939923 -p1 -%patch1955032 -p1 - -%patch1956891 -p1 - %patch1951877 -p1 @@ -532,6 +516,14 @@ cd .. %endif %changelog +* Tue Jul 06 2021 Alejandro Sáez - 1.16.5-1 +- Rebase to 1.16.5 +- Removes rhbz#1955032 patch, it's already included in this release +- Removes rhbz#1956891 patch, it's already included in this release +- Related: rhbz#1979677 +- Related: rhbz#1968738 +- Related: rhbz#1972420 + * Thu Jun 17 2021 David Benoit - 1.16.4-3 - Fix zero-size allocation memory leak. - Related: rhbz#1951877