1
0
mirror of https://github.com/golang/go synced 2024-11-19 14:34:42 -07:00

cmd/link: fix warning for buildmode=plugin on darwin/amd64

Without this CL, the system linker complains about absolute addressing
in type..eqfunc.*.

Updates #18190

Change-Id: I68db37a7f4c96b16a9c13baffc0f043a3048df6d
Reviewed-on: https://go-review.googlesource.com/59373
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Hiroshi Ioka 2017-08-27 19:09:18 +09:00 committed by Ian Lance Taylor
parent 5a6c332451
commit 88a1e85c70

View File

@ -1096,7 +1096,8 @@ func (l *Link) hostlink() {
argv = append(argv, "-Wl,-headerpad,1144")
if l.DynlinkingGo() {
argv = append(argv, "-Wl,-flat_namespace")
} else if !SysArch.InFamily(sys.ARM64) && Buildmode != BuildmodePIE {
}
if Buildmode == BuildmodeExe && !SysArch.InFamily(sys.ARM64) {
argv = append(argv, "-Wl,-no_pie")
}
case objabi.Hopenbsd: