mirror of https://github.com/golang/go.git
[release-branch.go1.8] 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/36417 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/36421 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
parent
ba878ac0c8
commit
f0749fe163
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue