diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index d0e634640c..510dc30f94 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -570,7 +570,7 @@ func (t *tester) supportedBuildmode(mode string) bool { case "c-shared": // TODO(hyangah): add linux-386. switch pair { - case "linux-amd64", "darwin-amd64", "android-arm": + case "linux-amd64", "darwin-amd64", "android-arm", "linux-arm": return true } return false diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go index c4678209ce..10eb723bb9 100644 --- a/src/cmd/link/internal/arm/obj.go +++ b/src/cmd/link/internal/arm/obj.go @@ -86,6 +86,10 @@ func archinit() { ld.Linkmode = ld.LinkInternal } + if ld.Buildmode == ld.BuildmodeCArchive || ld.Buildmode == ld.BuildmodeCShared || ld.DynlinkingGo() { + ld.Linkmode = ld.LinkExternal + } + switch ld.HEADTYPE { default: if ld.Linkmode == ld.LinkAuto {