aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-09-14 19:42:01 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-09-14 19:42:01 +0000
commite47515aa894046a8ebab87395d291fbbb1ccbd61 (patch)
tree66d9add4fc4c25d7b6aee8759dc4b768caeb9f42
parent01b0acb7610032d5f6bb32cc6ecda5955cb0c18a (diff)
downloadgcc-e47515aa894046a8ebab87395d291fbbb1ccbd61.zip
gcc-e47515aa894046a8ebab87395d291fbbb1ccbd61.tar.gz
gcc-e47515aa894046a8ebab87395d291fbbb1ccbd61.tar.bz2
cmd/go: correct gccgo buildid file on ARM
Bring in https://golang.org/cl/135297 from the gc repository to fix a GCC bug report. Original CL description: The GNU assembler for ARM treats @ as a comment character, so section types must be written using % instead. Fixes https://gcc.gnu.org/PR87260. Reviewed-on: https://go-review.googlesource.com/135360 From-SVN: r264330
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--libgo/go/cmd/go/internal/work/buildid.go8
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index d801077..3af5bd4 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-3fd61802286c81e5fb672f682d9e661181184d1f
+92a14213215fd93df7240fa9d376a1213b1d5a74
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/go/cmd/go/internal/work/buildid.go b/libgo/go/cmd/go/internal/work/buildid.go
index 733938e..c7c07ed 100644
--- a/libgo/go/cmd/go/internal/work/buildid.go
+++ b/libgo/go/cmd/go/internal/work/buildid.go
@@ -337,8 +337,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 {