]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: don't write text address directly if using plugins
authorCherry Zhang <cherryyz@google.com>
Mon, 20 Apr 2020 17:40:22 +0000 (13:40 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 20 Apr 2020 18:26:46 +0000 (18:26 +0000)
commit6290a5436578751bb04dacc9d8910a6e968683a2
treeefa06a5838973e3d010159a68985b202eb933b44
parentdce26bdbc1d031ae8058035516f6c76f0d709147
[dev.link] cmd/link: don't write text address directly if using plugins

When using plugins, on darwin we do weird things with
runtime.etext symbol, assigning a value for it, then clear it,
reassign a different value. This breaks the logic of writing text
address directly.

I think we should remove the weird thing with runtime.etext, if
possible. But for now, disable the optimization (this is not a
common case anyway).

Fix darwin-nocgo build.

Change-Id: Iab6a9f8519115226a5bbaaafe4a93f17042a928a
Reviewed-on: https://go-review.googlesource.com/c/go/+/229057
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/pcln.go