Commit c78ac39a authored by Yuval Pavel Zholkover's avatar Yuval Pavel Zholkover Committed by Ian Lance Taylor

cmd/link: use gold when dynamic linking on arm,arm64 only on Linux and Android

Fixes freebsd/arm build.

Change-Id: Id9b1905a5335f86d317dab7514e0ce7cb74aba1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/193537
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent b4924870
......@@ -1262,7 +1262,7 @@ func (ctxt *Link) hostlink() {
// from the beginning of the section (like sym.STYPE).
argv = append(argv, "-Wl,-znocopyreloc")
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) {
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && (objabi.GOOS == "linux" || objabi.GOOS == "android") {
// On ARM, the GNU linker will generate COPY relocations
// even with -znocopyreloc set.
// https://sourceware.org/bugzilla/show_bug.cgi?id=19962
......
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