mirror of
https://github.com/golang/go
synced 2024-11-26 11:08:38 -07:00
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:
parent
35d721b0cb
commit
816538d517
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user