c8-stream-rhel8
imports/c8-stream-rhel8/golang-1.19.6-1.module+el8.8.0+18289+edd6c8b6
parent
b989be745d
commit
0920c98a58
@ -1,2 +1,2 @@
|
||||
SOURCES/go1.19.4-1-openssl-fips.tar.gz
|
||||
SOURCES/go1.19.4.tar.gz
|
||||
SOURCES/go1.19.6-1-openssl-fips.tar.gz
|
||||
SOURCES/go1.19.6.tar.gz
|
||||
|
@ -1,2 +1,2 @@
|
||||
9463e718b1a8daa61009caa6c113197cbefbe9eb SOURCES/go1.19.4-1-openssl-fips.tar.gz
|
||||
6debf76aa6fb97daff4d49502153a47093883c28 SOURCES/go1.19.4.tar.gz
|
||||
e990e956bbd3c1e52914ea39f075a1c666bde4e4 SOURCES/go1.19.6-1-openssl-fips.tar.gz
|
||||
d85391faa6c2d74090008b9744e4664267700fd3 SOURCES/go1.19.6.tar.gz
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/src/crypto/tls/boring_test.go b/src/crypto/tls/boring_test.go
|
||||
index 10d1cf0..51feb3b 100644
|
||||
--- a/src/crypto/tls/boring_test.go
|
||||
+++ b/src/crypto/tls/boring_test.go
|
||||
@@ -326,7 +326,7 @@ func TestBoringCertAlgs(t *testing.T) {
|
||||
I_M2 := boringCert(t, "I_M2", I_R1.key, M2_R1, boringCertCA|boringCertFIPSOK)
|
||||
|
||||
L1_I := boringCert(t, "L1_I", boringECDSAKey(t, elliptic.P384()), I_R1, boringCertLeaf|boringCertFIPSOK)
|
||||
- L2_I := boringCert(t, "L2_I", boringRSAKey(t, 1024), I_R1, boringCertLeaf|boringCertNotBoring)
|
||||
+ L2_I := boringCert(t, "L2_I", boringRSAKey(t, 1024), I_R1, boringCertLeaf)
|
||||
|
||||
// client verifying server cert
|
||||
testServerCert := func(t *testing.T, desc string, pool *x509.CertPool, key interface{}, list [][]byte, ok bool) {
|
@ -1,122 +0,0 @@
|
||||
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.
|
Loading…
Reference in new issue