diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-04-27 18:01:00 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-04-27 18:01:00 +0000 |
commit | 2885a4939a7c96441210d6b3507524b6970d1013 (patch) | |
tree | 823cc61081c6ebb58903fd906f7014cb09caf29d /libgo | |
parent | 4c8906c942eccf5243489d0c855892c3936f8a4b (diff) | |
download | gcc-2885a4939a7c96441210d6b3507524b6970d1013.zip gcc-2885a4939a7c96441210d6b3507524b6970d1013.tar.gz gcc-2885a4939a7c96441210d6b3507524b6970d1013.tar.bz2 |
re PR go/85429 (Several gotools tests FAIL with Solaris as)
PR go/85429
cmd/go: add Solaris assembler syntax for gccgo buildid file
The Solaris assembler uses a different syntax for section directives.
This is https://golang.org/cl/109140 ported over to gccgo.
Reviewed-on: https://go-review.googlesource.com/109141
From-SVN: r259719
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/go/cmd/go/internal/work/buildid.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libgo/go/cmd/go/internal/work/buildid.go b/libgo/go/cmd/go/internal/work/buildid.go index a08de26..7f1ee50 100644 --- a/libgo/go/cmd/go/internal/work/buildid.go +++ b/libgo/go/cmd/go/internal/work/buildid.go @@ -309,7 +309,11 @@ func (b *Builder) gccgoBuildIDELFFile(a *Action) (string, error) { sfile := a.Objdir + "_buildid.s" var buf bytes.Buffer - fmt.Fprintf(&buf, "\t"+`.section .go.buildid,"e"`+"\n") + if cfg.Goos != "solaris" { + fmt.Fprintf(&buf, "\t"+`.section .go.buildid,"e"`+"\n") + } else { + fmt.Fprintf(&buf, "\t"+`.section ".go.buildid",#exclude`+"\n") + } fmt.Fprintf(&buf, "\t.byte ") for i := 0; i < len(a.buildID); i++ { if i > 0 { @@ -322,8 +326,10 @@ func (b *Builder) gccgoBuildIDELFFile(a *Action) (string, error) { fmt.Fprintf(&buf, "%#02x", a.buildID[i]) } fmt.Fprintf(&buf, "\n") - fmt.Fprintf(&buf, "\t"+`.section .note.GNU-stack,"",@progbits`+"\n") - fmt.Fprintf(&buf, "\t"+`.section .note.GNU-split-stack,"",@progbits`+"\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") + } if cfg.BuildN || cfg.BuildX { for _, line := range bytes.Split(buf.Bytes(), []byte("\n")) { |