]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: mark all Go symbols called from assembly in other packages
authorAustin Clements <austin@google.com>
Fri, 31 May 2019 20:38:56 +0000 (16:38 -0400)
committerAustin Clements <austin@google.com>
Thu, 6 Jun 2019 19:44:12 +0000 (19:44 +0000)
commitf5e5bc1a4281b22c9ca2c75431647638de515ba0
tree72e401c8b96177f5eef8d30a676e0779e15b9eab
parentdde7c770ef44d45b8a9f98bf0f46556f18df2f6e
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>
13 files changed:
src/runtime/asm.s
src/runtime/internal/atomic/atomic_386.go
src/runtime/internal/atomic/atomic_amd64x.go
src/runtime/internal/atomic/atomic_mipsx.go
src/runtime/internal/atomic/atomic_s390x.go
src/runtime/internal/atomic/atomic_wasm.go
src/runtime/proc.go
src/runtime/signal_unix.go
src/runtime/stack.go
src/runtime/string.go
src/runtime/sys_darwin.go
src/runtime/syscall_aix.go
src/runtime/syscall_solaris.go