libgo patch committed: Correct gccgo buildid file on ARM

Ian Lance Taylor iant@golang.org
Fri Sep 14 19:51:00 GMT 2018


This libgo patch changes the go tool to use %progbits rather than
@progbits on ARM.  This is necessary because gas on ARM uses @ as a
comment character.  This is a copy of https://golang.org/cl/135297 in
the master sources.  This fixes GCC PR 87260.  Bootstrapped and ran Go
testsuite on x86_64-pc-linux-gnu.  Committed to mainline and GCC 8
branch.

Ian
-------------- next part --------------
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 264325)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -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.
Index: libgo/go/cmd/go/internal/work/buildid.go
===================================================================
--- libgo/go/cmd/go/internal/work/buildid.go	(revision 264245)
+++ libgo/go/cmd/go/internal/work/buildid.go	(working copy)
@@ -337,8 +337,12 @@ func (b *Builder) gccgoBuildIDELFFile(a
 	}
 	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 {


More information about the Gcc-patches mailing list