diff --git a/doc/next/5-toolchain.md b/doc/next/5-toolchain.md index b1533ad8ac..51a1dbfbdf 100644 --- a/doc/next/5-toolchain.md +++ b/doc/next/5-toolchain.md @@ -21,8 +21,17 @@ Hot block alignment can be disabled with `-gcflags=[=]-d=alignhot=0` ## Linker {#linker} -TODO: Say what needs to be said in Go 1.23 release notes regarding -the locking down of future linkname uses. +The linker now disallows using a `//go:linkname` directive to refer to +internal symbols in the standard library (including the runtime) that +are not marked with `//go:linkname` on their definitions. +Similarly, the linker disallows references to such symbols from assembly +code. +For backward compatibility, existing usages of `//go:linkname` found in +a large open-source code corpus remain supported. +Any new references to standard library internal symbols will be disallowed. + +A linker command line flag `-checklinkname=0` can be used to disable +this check, for debugging and experimenting purposes. When building a dynamically linked ELF binary (including PIE binary), the