From c6d493937e7047057a9833661d6d20ce72f904b4 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 13 Nov 2018 18:38:49 -0500 Subject: [PATCH] cmd/go: more cross-package references from internal/syscall/unix MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 TryBot-Result: Gobot Gobot Reviewed-by: Tobias Klauser Reviewed-by: Clément Chigot Reviewed-by: Keith Randall --- src/cmd/go/internal/work/gc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/internal/work/gc.go b/src/cmd/go/internal/work/gc.go index a14a970ffb..c0c457cbad 100644 --- a/src/cmd/go/internal/work/gc.go +++ b/src/cmd/go/internal/work/gc.go @@ -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. -- 2.51.0