import golang-1.16.5-1.module+el8.5.0+11702+5e79d6f7
This commit is contained in:
parent
9511ca7f42
commit
cb4227f3df
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/go-go-1.16.4-1-openssl-fips.tar.gz
|
SOURCES/go-go-1.16.5-1-openssl-fips.tar.gz
|
||||||
|
@ -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
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
From 983dea90c169930e35721232afe39fd4e3fbe4a6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul E. Murphy <murp@ibm.com>
|
|
||||||
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 <murp@ibm.com>
|
|
||||||
Reviewed-by: Cherry Zhang <cherryyz@google.com>
|
|
||||||
TryBot-Result: Go Bot <gobot@golang.org>
|
|
||||||
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
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)
|
|
@ -1,69 +0,0 @@
|
|||||||
From 9ed736ac2a99aa2e7ef7d8bed3b01ca8b20a6f80 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lynn Boger <laboger@linux.vnet.ibm.com>
|
|
||||||
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 <laboger@linux.vnet.ibm.com>
|
|
||||||
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
|
|
||||||
Reviewed-by: Cherry Zhang <cherryyz@google.com>
|
|
||||||
TryBot-Result: Go Bot <gobot@golang.org>
|
|
||||||
---
|
|
||||||
|
|
||||||
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 {
|
|
@ -96,12 +96,12 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global go_api 1.16
|
%global go_api 1.16
|
||||||
%global go_version 1.16.4
|
%global go_version 1.16.5
|
||||||
%global pkg_release 1
|
%global pkg_release 1
|
||||||
|
|
||||||
Name: golang
|
Name: golang
|
||||||
Version: %{go_version}
|
Version: %{go_version}
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Go Programming Language
|
Summary: The Go Programming Language
|
||||||
# source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain
|
# source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain
|
||||||
License: BSD and Public Domain
|
License: BSD and Public Domain
|
||||||
@ -147,18 +147,6 @@ Patch223: golang-1.15-warnCN.patch
|
|||||||
|
|
||||||
Patch1939923: skip_test_rhbz1939923.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
|
# Fix FIPS mode memory leaks
|
||||||
Patch1951877: fix-crypto-memory-leaks.patch
|
Patch1951877: fix-crypto-memory-leaks.patch
|
||||||
|
|
||||||
@ -259,10 +247,6 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
|
|
||||||
%patch1939923 -p1
|
%patch1939923 -p1
|
||||||
|
|
||||||
%patch1955032 -p1
|
|
||||||
|
|
||||||
%patch1956891 -p1
|
|
||||||
|
|
||||||
%patch1951877 -p1
|
%patch1951877 -p1
|
||||||
|
|
||||||
|
|
||||||
@ -532,6 +516,14 @@ cd ..
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 06 2021 Alejandro Sáez <asm@redhat.com> - 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 <dbenoit@redhat.com> - 1.16.4-3
|
* Thu Jun 17 2021 David Benoit <dbenoit@redhat.com> - 1.16.4-3
|
||||||
- Fix zero-size allocation memory leak.
|
- Fix zero-size allocation memory leak.
|
||||||
- Related: rhbz#1951877
|
- Related: rhbz#1951877
|
||||||
|
Loading…
Reference in New Issue
Block a user