mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: mark all Go symbols called from assembly in other packages
This marks all Go symbols called from assembly in other packages with "go:linkname" directives to ensure they get ABI wrappers. Now that we have this go:linkname convention, this also removes the abi0Syms definition in the runtime, which was used to give morestackc an ABI0 wrapper. Instead, we now just mark morestackc with a go:linkname directive. This was tested with buildall.bash in the default configuration, with -race, and with -gcflags=all=-d=ssa/intrinsics/off. Since I couldn't test cgo on non-Linux configurations, I manually grepped for runtime symbols in runtime/cgo. Updates #31230. Change-Id: I6c8aa56be2ca6802dfa2bf159e49c411b9071bf1 Reviewed-on: https://go-review.googlesource.com/c/go/+/179862 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
dde7c770ef
commit
f5e5bc1a42
13 changed files with 106 additions and 8 deletions
|
|
@ -1295,7 +1295,10 @@ type stackObjectRecord struct {
|
|||
typ *_type
|
||||
}
|
||||
|
||||
// This is exported as ABI0 via linkname so obj can call it.
|
||||
//
|
||||
//go:nosplit
|
||||
//go:linkname morestackc
|
||||
func morestackc() {
|
||||
throw("attempt to execute system stack code on user stack")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue