Skip to content

Commit b2696fd

Browse files
CornePlascherrymui
authored andcommitted
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
1 parent 1858980 commit b2696fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/link/internal/ld/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func determineLinkMode(ctxt *Link) {
244244
ctxt.LinkMode = LinkExternal
245245
via = "via GO_EXTLINK_ENABLED "
246246
default:
247-
if extNeeded || (iscgo && externalobj) || ctxt.BuildMode == BuildModePIE {
247+
if extNeeded || (iscgo && externalobj) {
248248
ctxt.LinkMode = LinkExternal
249249
} else {
250250
ctxt.LinkMode = LinkInternal

0 commit comments

Comments
 (0)