]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: use gold when dynamic linking on arm,arm64 only on Linux and Android
authorYuval Pavel Zholkover <paulzhol@gmail.com>
Thu, 5 Sep 2019 05:50:11 +0000 (08:50 +0300)
committerIan Lance Taylor <iant@golang.org>
Fri, 6 Sep 2019 17:41:07 +0000 (17:41 +0000)
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: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/lib.go

index 1deab660b71c511ff239a1d173bb1818b23c86d4..8919815759f9167a05404794979789646397e07c 100644 (file)
@@ -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