commit
f6d70896f5
@ -0,0 +1,2 @@
|
||||
SOURCES/go1.19.4-1-openssl-fips.tar.gz
|
||||
SOURCES/go1.19.4.tar.gz
|
@ -0,0 +1,2 @@
|
||||
9463e718b1a8daa61009caa6c113197cbefbe9eb SOURCES/go1.19.4-1-openssl-fips.tar.gz
|
||||
6debf76aa6fb97daff4d49502153a47093883c28 SOURCES/go1.19.4.tar.gz
|
@ -0,0 +1,288 @@
|
||||
diff --git a/src/crypto/internal/backend/nobackend.go b/src/crypto/internal/backend/nobackend.go
|
||||
index 5f258a2..5dbbc42 100644
|
||||
--- a/src/crypto/internal/backend/nobackend.go
|
||||
+++ b/src/crypto/internal/backend/nobackend.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl
|
||||
-// +build !linux !cgo android cmd_go_bootstrap msan no_openssl
|
||||
+//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl || static
|
||||
+// +build !linux !cgo android cmd_go_bootstrap msan no_openssl static
|
||||
|
||||
package backend
|
||||
|
||||
diff --git a/src/crypto/internal/boring/goboringcrypto.h b/src/crypto/internal/boring/goboringcrypto.h
|
||||
index d6d99b1..f2fe332 100644
|
||||
--- a/src/crypto/internal/boring/goboringcrypto.h
|
||||
+++ b/src/crypto/internal/boring/goboringcrypto.h
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
+// +build !static
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
diff --git a/src/crypto/internal/boring/syso/syso.go b/src/crypto/internal/boring/syso/syso.go
|
||||
index b338754..db5ea1e 100644
|
||||
--- a/src/crypto/internal/boring/syso/syso.go
|
||||
+++ b/src/crypto/internal/boring/syso/syso.go
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build boringcrypto
|
||||
+//go:build boringcrypto && !static
|
||||
|
||||
// This package only exists with GOEXPERIMENT=boringcrypto.
|
||||
// It provides the actual syso file.
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go
|
||||
index 079fc3c..e826d0b 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/aes.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go
|
||||
index 0b61e79..94d0c98 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdh.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go
|
||||
index afec529..d822152 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/ecdsa.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h b/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h
|
||||
index 6d6a562..17cc314 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/goopenssl.h
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright 2017 The Go Authors. All rights reserved.
|
||||
+// +build !static
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
// +build linux
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go
|
||||
index ae40b93..17bc075 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hkdf.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go
|
||||
index 6f00177..f466b18 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/hmac.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go
|
||||
index 7c0b5d6..262af07 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/notboring.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl
|
||||
-// +build !linux !cgo android cmd_go_bootstrap msan no_openssl
|
||||
+//go:build !linux || !cgo || android || cmd_go_bootstrap || msan || no_openssl || static
|
||||
+// +build !linux !cgo android cmd_go_bootstrap msan no_openssl static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go
|
||||
index d49194d..ff15054 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c
|
||||
index 2349db1..57fbb04 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_ecdsa_signature.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// +build linux
|
||||
+// +build !static
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
// +build !cmd_go_bootstrap
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c
|
||||
index 4379019..5034c46 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_evp.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// +build linux
|
||||
+// +build !static
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
// +build !cmd_go_bootstrap
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c
|
||||
index 49d40a7..3b3dbf8 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_lock_setup.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// +build linux
|
||||
+// +build !static
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
// +build !cmd_go_bootstrap
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c
|
||||
index 7eb645e..1c3225a 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_aead_gcm.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// This file contains a port of the BoringSSL AEAD interface.
|
||||
+// +build !static
|
||||
// +build linux
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c
|
||||
index df4ebe3..876393b 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_ctr128.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// +build linux
|
||||
+// +build !static
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
// +build !cmd_go_bootstrap
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c
|
||||
index 2eedd5b..04510d3 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_evp_md5_sha1.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// This file contains a backport of the EVP_md5_sha1 method.
|
||||
+// +build !static
|
||||
// +build linux
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c
|
||||
index 362d9e5..bebafef 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_hmac.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// This file contains HMAC portability wrappers.
|
||||
+// +build !static
|
||||
// +build linux
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c
|
||||
index 2824147..8bc1d85 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_port_rsa.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// This file contains RSA portability wrappers.
|
||||
+// +build !static
|
||||
// +build linux
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c
|
||||
index 22bd865..b7aa26b 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/openssl_stub_rand.c
|
||||
@@ -1,4 +1,5 @@
|
||||
// +build linux
|
||||
+// +build !static
|
||||
// +build !android
|
||||
// +build !no_openssl
|
||||
// +build !cmd_go_bootstrap
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go
|
||||
index b3668b8..dcdae70 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rand.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go
|
||||
index 915c840..8623d9d 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/rsa.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
||||
diff --git a/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go b/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go
|
||||
index 0b55ced..57309c0 100644
|
||||
--- a/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go
|
||||
+++ b/src/vendor/github.com/golang-fips/openssl-fips/openssl/sha.go
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
-//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl
|
||||
-// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl
|
||||
+//go:build linux && !android && !cmd_go_bootstrap && !msan && !no_openssl && !static
|
||||
+// +build linux,!android,!cmd_go_bootstrap,!msan,!no_openssl,!static
|
||||
|
||||
package openssl
|
||||
|
@ -0,0 +1,36 @@
|
||||
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
|
||||
index da5b179..6a772df 100644
|
||||
--- a/src/cmd/dist/test.go
|
||||
+++ b/src/cmd/dist/test.go
|
||||
@@ -1247,18 +1247,20 @@ func (t *tester) cgoTest(dt *distTest) error {
|
||||
fmt.Println("No support for static linking found (lacks libc.a?), skip cgo static linking test.")
|
||||
} else {
|
||||
if goos != "android" {
|
||||
- t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
|
||||
+ t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, "-tags=no_openssl")
|
||||
}
|
||||
t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), ".")
|
||||
t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external`, ".")
|
||||
if goos != "android" {
|
||||
- t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
|
||||
+ t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, "-tags=no_openssl")
|
||||
+ /*
|
||||
t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
|
||||
// -static in CGO_LDFLAGS triggers a different code path
|
||||
// than -static in -extldflags, so test both.
|
||||
// See issue #16651.
|
||||
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", ".")
|
||||
setEnv(cmd, "CGO_LDFLAGS", "-static -pthread")
|
||||
+ */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1268,7 +1270,7 @@ func (t *tester) cgoTest(dt *distTest) error {
|
||||
t.addCmd(dt, "misc/cgo/test", t.goTest(), "-buildmode=pie", "-ldflags=-linkmode=internal", "-tags=internal,internal_pie", ".")
|
||||
}
|
||||
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-buildmode=pie", ".")
|
||||
- t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie", ".")
|
||||
+ t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie", "-tags=no_openssl")
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
// +build rpm_crashtraceback
|
||||
|
||||
package runtime
|
||||
|
||||
func init() {
|
||||
setTraceback("crash")
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/src/cmd/go/testdata/script/list_std.txt b/src/cmd/go/testdata/script/list_std.txt
|
||||
index 6ab1bd1..4a00e43 100644
|
||||
--- a/src/cmd/go/testdata/script/list_std.txt
|
||||
+++ b/src/cmd/go/testdata/script/list_std.txt
|
||||
@@ -6,7 +6,7 @@ env GO111MODULE=off
|
||||
# Listing GOROOT should only find standard packages.
|
||||
cd $GOROOT/src
|
||||
go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' ./...
|
||||
-! stdout .
|
||||
+stdout _$GOROOT
|
||||
|
||||
# Standard packages should include cmd, but not cmd/vendor.
|
||||
go list ./...
|
@ -0,0 +1 @@
|
||||
add-auto-load-safe-path /usr/lib/golang/src/pkg/runtime/runtime-gdb.py
|
@ -0,0 +1,3 @@
|
||||
# there are ELF files in src which are testdata and shouldn't be modified
|
||||
-b /usr/lib/golang/src
|
||||
-b /usr/lib64/golang/src
|
@ -0,0 +1,122 @@
|
||||
diff --git a/src/cmd/go/testdata/script/trampoline_reuse_test.txt b/src/cmd/go/testdata/script/trampoline_reuse_test.txt
|
||||
new file mode 100644
|
||||
index 0000000000000..bca897c16d054
|
||||
--- /dev/null
|
||||
+++ b/src/cmd/go/testdata/script/trampoline_reuse_test.txt
|
||||
@@ -0,0 +1,100 @@
|
||||
+# Verify PPC64 does not reuse a trampoline which is too far away.
|
||||
+# This tests an edge case where the direct call relocation addend should
|
||||
+# be ignored when computing the distance from the direct call to the
|
||||
+# already placed trampoline
|
||||
+[short] skip
|
||||
+[!ppc64] [!ppc64le] skip
|
||||
+[aix] skip
|
||||
+
|
||||
+# Note, this program does not run. Presumably, 'DWORD $0' is simpler to
|
||||
+# assembly 2^26 or so times.
|
||||
+#
|
||||
+# We build something which should be laid out as such:
|
||||
+#
|
||||
+# bar.Bar
|
||||
+# main.Func1
|
||||
+# bar.Bar+400-tramp0
|
||||
+# main.BigAsm
|
||||
+# main.Func2
|
||||
+# bar.Bar+400-tramp1
|
||||
+#
|
||||
+# bar.Bar needs to be placed far enough away to generate relocations
|
||||
+# from main package calls. and main.Func1 and main.Func2 are placed
|
||||
+# a bit more than the direct call limit apart, but not more than 0x400
|
||||
+# bytes beyond it (to verify the reloc calc).
|
||||
+
|
||||
+go build
|
||||
+
|
||||
+-- go.mod --
|
||||
+
|
||||
+module foo
|
||||
+
|
||||
+go 1.19
|
||||
+
|
||||
+-- main.go --
|
||||
+
|
||||
+package main
|
||||
+
|
||||
+import "foo/bar"
|
||||
+
|
||||
+func Func1()
|
||||
+
|
||||
+func main() {
|
||||
+ Func1()
|
||||
+ bar.Bar2()
|
||||
+}
|
||||
+
|
||||
+-- foo.s --
|
||||
+
|
||||
+TEXT main·Func1(SB),0,$0-0
|
||||
+ CALL bar·Bar+0x400(SB)
|
||||
+ CALL main·BigAsm(SB)
|
||||
+// A trampoline will be placed here to bar.Bar
|
||||
+
|
||||
+// This creates a gap sufficiently large to prevent trampoline reuse
|
||||
+#define NOP64 DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0;
|
||||
+#define NOP256 NOP64 NOP64 NOP64 NOP64
|
||||
+#define NOP2S10 NOP256 NOP256 NOP256 NOP256
|
||||
+#define NOP2S12 NOP2S10 NOP2S10 NOP2S10 NOP2S10
|
||||
+#define NOP2S14 NOP2S12 NOP2S12 NOP2S12 NOP2S12
|
||||
+#define NOP2S16 NOP2S14 NOP2S14 NOP2S14 NOP2S14
|
||||
+#define NOP2S18 NOP2S16 NOP2S16 NOP2S16 NOP2S16
|
||||
+#define NOP2S20 NOP2S18 NOP2S18 NOP2S18 NOP2S18
|
||||
+#define NOP2S22 NOP2S20 NOP2S20 NOP2S20 NOP2S20
|
||||
+#define NOP2S24 NOP2S22 NOP2S22 NOP2S22 NOP2S22
|
||||
+#define BIGNOP NOP2S24 NOP2S24
|
||||
+TEXT main·BigAsm(SB),0,$0-0
|
||||
+ // Fill to the direct call limit so Func2 must generate a new trampoline.
|
||||
+ // As the implicit trampoline above is just barely unreachable.
|
||||
+ BIGNOP
|
||||
+ MOVD $main·Func2(SB), R3
|
||||
+
|
||||
+TEXT main·Func2(SB),0,$0-0
|
||||
+ CALL bar·Bar+0x400(SB)
|
||||
+// Another trampoline should be placed here.
|
||||
+
|
||||
+-- bar/bar.s --
|
||||
+
|
||||
+#define NOP64 DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0; DWORD $0;
|
||||
+#define NOP256 NOP64 NOP64 NOP64 NOP64
|
||||
+#define NOP2S10 NOP256 NOP256 NOP256 NOP256
|
||||
+#define NOP2S12 NOP2S10 NOP2S10 NOP2S10 NOP2S10
|
||||
+#define NOP2S14 NOP2S12 NOP2S12 NOP2S12 NOP2S12
|
||||
+#define NOP2S16 NOP2S14 NOP2S14 NOP2S14 NOP2S14
|
||||
+#define NOP2S18 NOP2S16 NOP2S16 NOP2S16 NOP2S16
|
||||
+#define NOP2S20 NOP2S18 NOP2S18 NOP2S18 NOP2S18
|
||||
+#define NOP2S22 NOP2S20 NOP2S20 NOP2S20 NOP2S20
|
||||
+#define NOP2S24 NOP2S22 NOP2S22 NOP2S22 NOP2S22
|
||||
+#define BIGNOP NOP2S24 NOP2S24 NOP2S10
|
||||
+// A very big not very interesting function.
|
||||
+TEXT bar·Bar(SB),0,$0-0
|
||||
+ BIGNOP
|
||||
+
|
||||
+-- bar/bar.go --
|
||||
+
|
||||
+package bar
|
||||
+
|
||||
+func Bar()
|
||||
+
|
||||
+func Bar2() {
|
||||
+}
|
||||
diff --git a/src/cmd/link/internal/ppc64/asm.go b/src/cmd/link/internal/ppc64/asm.go
|
||||
index 5d5fbe2a97735..6313879da083c 100644
|
||||
--- a/src/cmd/link/internal/ppc64/asm.go
|
||||
+++ b/src/cmd/link/internal/ppc64/asm.go
|
||||
@@ -900,8 +900,9 @@ func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) {
|
||||
if ldr.SymValue(tramp) == 0 {
|
||||
break
|
||||
}
|
||||
-
|
||||
- t = ldr.SymValue(tramp) + r.Add() - (ldr.SymValue(s) + int64(r.Off()))
|
||||
+ // Note, the trampoline is always called directly. The addend of the original relocation is accounted for in the
|
||||
+ // trampoline itself.
|
||||
+ t = ldr.SymValue(tramp) - (ldr.SymValue(s) + int64(r.Off()))
|
||||
|
||||
// With internal linking, the trampoline can be used if it is not too far.
|
||||
// With external linking, the trampoline must be in this section for it to be reused.
|
@ -0,0 +1,12 @@
|
||||
diff --git a/src/crypto/x509/x509_test.go b/src/crypto/x509/x509_test.go
|
||||
index b1cdabb..09eaace 100644
|
||||
--- a/src/crypto/x509/x509_test.go
|
||||
+++ b/src/crypto/x509/x509_test.go
|
||||
@@ -2993,6 +2993,7 @@ func (bs *brokenSigner) Sign(_ io.Reader, _ []byte, _ crypto.SignerOpts) ([]byte
|
||||
}
|
||||
|
||||
func TestCreateCertificateBrokenSigner(t *testing.T) {
|
||||
+ t.Skip("TODO Fix me: rhbz#1939923")
|
||||
template := &Certificate{
|
||||
SerialNumber: big.NewInt(10),
|
||||
DNSNames: []string{"example.com"},
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue