]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link/internal/ld,misc/cgo/testcshared: don't -fuse-ld=gold on Android
authorElias Naur <mail@eliasnaur.com>
Wed, 13 Nov 2019 10:57:17 +0000 (11:57 +0100)
committerElias Naur <mail@eliasnaur.com>
Thu, 14 Nov 2019 17:43:48 +0000 (17:43 +0000)
The NDK is switching to ldd, and will stop including the gold linker.

Change-Id: If74168017c9874134b34010906ab1d94001528b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/206840
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testcshared/cshared_test.go
src/cmd/link/internal/ld/lib.go

index daef3a9e54644d322212fd7bdd0d9f27147f189a..194dec96ad762bc3402b9205869702f42bd6e04b 100644 (file)
@@ -103,7 +103,7 @@ func testMain(m *testing.M) int {
                // TODO(crawshaw): can we do better?
                cc = append(cc, []string{"-framework", "CoreFoundation", "-framework", "Foundation"}...)
        case "android":
-               cc = append(cc, "-pie", "-fuse-ld=gold")
+               cc = append(cc, "-pie")
        }
        libgodir := GOOS + "_" + GOARCH
        switch GOOS {
index 09a5f2a711ddd85c58c4488a88ecc4fbb65cb45e..45cc87287c38a9e2d73408ef2f332b8427dd1c05 100644 (file)
@@ -1313,7 +1313,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) && (objabi.GOOS == "linux" || objabi.GOOS == "android") {
+               if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && objabi.GOOS == "linux" {
                        // On ARM, the GNU linker will generate COPY relocations
                        // even with -znocopyreloc set.
                        // https://sourceware.org/bugzilla/show_bug.cgi?id=19962