From: Ian Lance Taylor Date: Thu, 13 Sep 2018 22:02:27 +0000 (-0700) Subject: cmd/go: correct gccgo buildid file on ARM X-Git-Tag: go1.12beta1~1089 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a708353a0c2c39ce4e8182ea75e5082135ae674f;p=gostls13.git cmd/go: correct gccgo buildid file on ARM The GNU assembler for ARM treats @ as a comment character, so section types must be written using % instead. Fixes https://gcc.gnu.org/PR87260. Change-Id: I5461e4bf5b20793db321f540c7f25a9e6e12b6f4 Reviewed-on: https://go-review.googlesource.com/135297 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Bryan C. Mills --- diff --git a/src/cmd/go/internal/work/buildid.go b/src/cmd/go/internal/work/buildid.go index f6b79711f9..8b97e8b75b 100644 --- a/src/cmd/go/internal/work/buildid.go +++ b/src/cmd/go/internal/work/buildid.go @@ -348,8 +348,12 @@ func (b *Builder) gccgoBuildIDELFFile(a *Action) (string, error) { } fmt.Fprintf(&buf, "\n") if cfg.Goos != "solaris" { - fmt.Fprintf(&buf, "\t"+`.section .note.GNU-stack,"",@progbits`+"\n") - fmt.Fprintf(&buf, "\t"+`.section .note.GNU-split-stack,"",@progbits`+"\n") + secType := "@progbits" + if cfg.Goarch == "arm" { + secType = "%progbits" + } + fmt.Fprintf(&buf, "\t"+`.section .note.GNU-stack,"",%s`+"\n", secType) + fmt.Fprintf(&buf, "\t"+`.section .note.GNU-split-stack,"",%s`+"\n", secType) } if cfg.BuildN || cfg.BuildX {