]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go, cmd/asm: pass -linkshared to assembler for shared linkage builds
authorThan McIntosh <thanm@google.com>
Thu, 10 Dec 2020 13:44:44 +0000 (08:44 -0500)
committerThan McIntosh <thanm@google.com>
Thu, 10 Dec 2020 16:38:15 +0000 (16:38 +0000)
commit56b783ad94f9a55163d494d5b34c783a9603d478
tree1dee1623c6c187de1f69599d011b9d2bf8f22c29
parentb110733327a66870da9c5f482d8fd3275dae55f3
cmd/go, cmd/asm: pass -linkshared to assembler for shared linkage builds

When the -linkshared build mode is in effect, the Go command passes
the "-linkshared" command line option to the compiler so as to insure
special handling for things like builtin functions (which may appear
in a shared library and not the main executable). This patch extends
this behavior to the assembler, since the assembler may also wind up
referencing builtins when emitting a stack-split prolog.

Fixes #43107.

Change-Id: I56eaded79789b083f3c3d800fb140353dee33ba9
Reviewed-on: https://go-review.googlesource.com/c/go/+/276932
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/flags/flags.go
src/cmd/asm/main.go
src/cmd/go/internal/work/init.go