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>
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