]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: more cross-package references from internal/syscall/unix
authorAustin Clements <austin@google.com>
Tue, 13 Nov 2018 23:38:49 +0000 (18:38 -0500)
committerAustin Clements <austin@google.com>
Fri, 23 Nov 2018 21:21:35 +0000 (21:21 +0000)
On some platforms, assembly in internal/syscall/unix references
unexported runtime symbols. Catch these references so the compiler can
generate the necessary ABI wrappers.

Fixes #28769.
Updates #27539.

Change-Id: I118eebfb8b3d907b4c3562198e6afb49854f5827
Reviewed-on: https://go-review.googlesource.com/c/149817
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Clément Chigot <clement.chigot@atos.net>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/go/internal/work/gc.go

index a14a970ffbd3c337c63edf3aa4c55b1d75a15a5e..c0c457cbad3fb804fc03542cd0ce411fde937073 100644 (file)
@@ -295,9 +295,9 @@ func (gcToolchain) symabis(b *Builder, a *Action, sfiles []string) (string, erro
        // Gather known cross-package references from assembly code.
        var otherPkgs []string
        if p.ImportPath == "runtime" {
-               // Assembly in syscall and runtime/cgo references
+               // Assembly in the following packages references
                // symbols in runtime.
-               otherPkgs = []string{"syscall", "runtime/cgo"}
+               otherPkgs = []string{"syscall", "internal/syscall/unix", "runtime/cgo"}
        } else if p.ImportPath == "runtime/internal/atomic" {
                // sync/atomic is an assembly wrapper around
                // runtime/internal/atomic.