doc/next: document locking down linkname usages

For #65614.
Updates #67401.

Change-Id: Ib38c134ea7ffc69434c79600ba75185e02809d0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/591898
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Cherry Mui 2024-06-11 11:02:38 -04:00
parent 35d721b0cb
commit 816538d517

View file

@ -21,8 +21,17 @@ Hot block alignment can be disabled with `-gcflags=[<packages>=]-d=alignhot=0`
## Linker {#linker} ## Linker {#linker}
<!-- go.dev/issue/67401, CL 585556, CL 587220, and many more --> <!-- go.dev/issue/67401, CL 585556, CL 587220, and many more -->
TODO: Say what needs to be said in Go 1.23 release notes regarding The linker now disallows using a `//go:linkname` directive to refer to
the locking down of future linkname uses. 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.
<!-- CL 473495 --> <!-- CL 473495 -->
When building a dynamically linked ELF binary (including PIE binary), the When building a dynamically linked ELF binary (including PIE binary), the