diff --git a/go b/go index 0d0822bdcb..76d509e948 160000 --- a/go +++ b/go @@ -1 +1 @@ -Subproject commit 0d0822bdcb0537209da6a9211c9f83532f4fae36 +Subproject commit 76d509e948d3a6e663936b7860444799efa82fe0 diff --git a/patches/0002-Add-crypto-backends.patch b/patches/0002-Add-crypto-backends.patch index 682d3913f6..6c7ac3ca0f 100644 --- a/patches/0002-Add-crypto-backends.patch +++ b/patches/0002-Add-crypto-backends.patch @@ -36,6 +36,7 @@ Subject: [PATCH] Add crypto backends src/cmd/link/internal/ld/lib.go | 6 + src/cmd/link/link_test.go | 8 + src/cmd/link/testdata/script/README | 2 + + src/cmd/nm/testdata/script/README | 2 + src/crypto/aes/aes.go | 6 +- src/crypto/aes/aes_test.go | 2 +- src/crypto/boring/boring.go | 4 +- @@ -137,7 +138,7 @@ Subject: [PATCH] Add crypto backends src/os/exec/exec_test.go | 9 + src/runtime/runtime_boring.go | 5 + src/syscall/syscall_windows.go | 3 + - 133 files changed, 2509 insertions(+), 378 deletions(-) + 134 files changed, 2511 insertions(+), 378 deletions(-) create mode 100644 src/cmd/go/systemcrypto_test.go create mode 100644 src/crypto/dsa/boring.go create mode 100644 src/crypto/dsa/notboring.go @@ -433,10 +434,10 @@ index 43ac003c7907c7..4daeb1a5ced0eb 100644 + return enabled +} diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go -index 74cafe9613917d..31ce076273aba2 100644 +index 44cec1ae79e710..a03f2324ba36bc 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go -@@ -2616,6 +2616,9 @@ +@@ -2620,6 +2620,9 @@ // mentioned will be considered insecure by 'go get'. // Because the variable is defined by Git, the default value cannot // be set using 'go env -w'. @@ -589,7 +590,7 @@ index 3d72c368b088a2..4fe28740a6e3c2 100644 env[i].Changed = true } diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go -index 4f76f7f9c1fc68..783d11609c0bf4 100644 +index b305457a23d104..5154aa0be0007c 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -755,6 +755,9 @@ Special-purpose environment variables: @@ -1302,6 +1303,19 @@ index 9ec997a138f0f2..09c4e7955ec162 100644 [verbose] testing.Verbose() +diff --git a/src/cmd/nm/testdata/script/README b/src/cmd/nm/testdata/script/README +index 9ec997a138f0f2..09c4e7955ec162 100644 +--- a/src/cmd/nm/testdata/script/README ++++ b/src/cmd/nm/testdata/script/README +@@ -281,6 +281,8 @@ The available conditions are: + testing.Short() + [symlink] + testenv.HasSymlink() ++[systemcrypto] ++ system crypto is enabled + [verbose] + testing.Verbose() + diff --git a/src/crypto/aes/aes.go b/src/crypto/aes/aes.go index 22ea8819ed239a..d918b8d57c5801 100644 --- a/src/crypto/aes/aes.go @@ -5881,7 +5895,7 @@ index f55150697d96f6..b4a89941749d99 100644 type clientHandshakeStateTLS13 struct { diff --git a/src/crypto/tls/handshake_server.go b/src/crypto/tls/handshake_server.go -index a4544a13051f51..f889d38b5e922c 100644 +index b62feef1a0d2a3..a51f06da2a4928 100644 --- a/src/crypto/tls/handshake_server.go +++ b/src/crypto/tls/handshake_server.go @@ -64,7 +64,20 @@ func (c *Conn) serverHandshake(ctx context.Context) error { @@ -6128,7 +6142,7 @@ index 00000000000000..ffb835ce34a2f7 + } +} diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go -index a71759adcb7363..ab31931e34b495 100644 +index 67627cdb93ff22..3a7fc5413e2696 100644 --- a/src/go/build/deps_test.go +++ b/src/go/build/deps_test.go @@ -372,8 +372,10 @@ var depsRules = ` diff --git a/patches/0012-Fix-PE-BSS-symbol-classification.patch b/patches/0012-Fix-PE-BSS-symbol-classification.patch new file mode 100644 index 0000000000..8c7d750691 --- /dev/null +++ b/patches/0012-Fix-PE-BSS-symbol-classification.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: qmuntal +Date: Mon, 29 Jun 2026 16:43:27 +0200 +Subject: [PATCH] cmd/internal/objfile: fix PE BSS symbol classification + +The PE symbol reader uses runtime.bss to distinguish initialized data from BSS +when Windows internal linking places BSS at the end of a writable data section. + +For externally linked PE files, symbol values are section-relative, so comparing +a symbol in one section against runtime.bss from another section can misclassify +initialized data such as runtime.noptrdata as BSS. + +Remember the section containing runtime.bss and only apply the BSS-boundary +heuristic to symbols from that same section. +--- + src/cmd/internal/objfile/pe.go | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/cmd/internal/objfile/pe.go b/src/cmd/internal/objfile/pe.go +index ca8add70ba..7bbfaa54d1 100644 +--- a/src/cmd/internal/objfile/pe.go ++++ b/src/cmd/internal/objfile/pe.go +@@ -44,9 +44,11 @@ func (f *peFile) symbols() ([]Sym, error) { + // That is, there can be BSS symbols at the end of the page + // that holds the last data symbols. + var bssAddr uint32 ++ var bssSectionNumber int16 + for _, s := range f.pe.Symbols { + if s.Name == "runtime.bss" { + bssAddr = s.Value ++ bssSectionNumber = s.SectionNumber + break + } + } +@@ -84,7 +86,7 @@ func (f *peFile) symbols() ([]Sym, error) { + case ch&data != 0: + if ch&permW == 0 { + sym.Code = 'R' +- } else if bssAddr > 0 && s.Value >= bssAddr { ++ } else if bssSectionNumber == s.SectionNumber && bssAddr > 0 && s.Value >= bssAddr { + // Past runtime.bss is BSS. + sym.Code = 'B' + } else if s.Value >= sect.Size { +-- +2.54.0.windows.1 +