From 4658dfc6c6f591f256d27d3f2b765b5b1aa978cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 29 Aug 2026 15:49:08 +0800 Subject: [PATCH] Make badlinkname without bad linkname --- common/badtls/registry.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/badtls/registry.go b/common/badtls/registry.go index 34cfe9ec..6402898b 100644 --- a/common/badtls/registry.go +++ b/common/badtls/registry.go @@ -8,6 +8,12 @@ import ( "unsafe" ) +// cmd/compile creates the method symbols of *tls.Conn and of its field types with their +// package recorded when the type is first used by a declaration; a linkname pull processed +// afterwards reuses that symbol as a package-indexed reference, which the linker's +// -checklinkname does not inspect. This declaration must precede the linkname declarations. +var _ *tls.Conn + type Methods struct { readRecord func(c unsafe.Pointer) error handlePostHandshakeMessage func(c unsafe.Pointer) error