aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCorne van der Plas <vdplas@gmail.com>2019-11-19 13:22:55 +0100
committerCherry Zhang <cherryyz@google.com>2020-02-25 15:13:24 +0000
commitb2696fde403a5b059936ac6dd22b6ec9a899e084 (patch)
treec78b95a247f5164bd3e4c90e2383a52254492292 /src
parent185898064555ee55598c6496c264d2ded46ceca8 (diff)
downloadgo-b2696fde403a5b059936ac6dd22b6ec9a899e084.tar.xz
cmd/link: Revert -buildmode=pie to internal linking
When internal linking was broken buildmode PIE is set to external linking. Now internal linking is fixed, -buildmode=pie can default to internal linking again. Fixes #35545 Change-Id: Iaf86b3047eb76babebc1545a79125586a7a3980e Reviewed-on: https://go-review.googlesource.com/c/go/+/207877 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/link/internal/ld/config.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go
index dcbe136832..86d8779512 100644
--- a/src/cmd/link/internal/ld/config.go
+++ b/src/cmd/link/internal/ld/config.go
@@ -244,7 +244,7 @@ func determineLinkMode(ctxt *Link) {
ctxt.LinkMode = LinkExternal
via = "via GO_EXTLINK_ENABLED "
default:
- if extNeeded || (iscgo && externalobj) || ctxt.BuildMode == BuildModePIE {
+ if extNeeded || (iscgo && externalobj) {
ctxt.LinkMode = LinkExternal
} else {
ctxt.LinkMode = LinkInternal