Commit ab067cde authored by David Crawshaw's avatar David Crawshaw

cmd/link: use external linking for PIE by default

Now `go test -buildmode=pie std -short` passes on linux/amd64.

Updates #18968

Change-Id: Ide21877713e00edc64c1700c950016d6bff8de0e
Reviewed-on: https://go-review.googlesource.com/36417Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 5f374ea8
......@@ -238,6 +238,8 @@ func determineLinkMode(ctxt *Link) {
Linkmode = LinkExternal
} else if iscgo && externalobj {
Linkmode = LinkExternal
} else if Buildmode == BuildmodePIE {
Linkmode = LinkExternal // https://golang.org/issue/18968
} else {
Linkmode = LinkInternal
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment