diff options
author | Russ Cox <rsc@golang.org> | 2021-04-20 14:08:58 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2021-04-23 21:42:54 +0000 |
commit | cef3a442eaa1f86b81bb67fb881c5bb9e446fb13 (patch) | |
tree | 7a8e1b304dc7f2d60bc4c5d67d1a3ad64b1b427d /src/cmd/asm | |
parent | 19470dc535513dc824fe5c1dbec700329e7692dc (diff) | |
download | go-cef3a442eaa1f86b81bb67fb881c5bb9e446fb13.tar.gz go-cef3a442eaa1f86b81bb67fb881c5bb9e446fb13.zip |
cmd/asm, cmd/link: use full objabi header
The cmd/link check of the objabi header was a bit lax because
historically the assembler has not included the full version string.
And the assembler didn't do that because it didn't have access to it:
that was buried inside the compiler.
But now that we have cmd/internal/objabi, all the tools have full
access to the expected string, and they can use it, which simplifies
the cmd/link consistency check.
Do that.
Change-Id: I33bd2f9d36c373cc3c32ff02ec6368365088b011
Reviewed-on: https://go-review.googlesource.com/c/go/+/312030
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r-- | src/cmd/asm/main.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/asm/main.go b/src/cmd/asm/main.go index e5a9ee565e..043bc696e5 100644 --- a/src/cmd/asm/main.go +++ b/src/cmd/asm/main.go @@ -19,6 +19,7 @@ import ( "cmd/internal/bio" "cmd/internal/obj" + "cmd/internal/objabi" ) func main() { @@ -69,7 +70,7 @@ func main() { defer buf.Close() if !*flags.SymABIs { - fmt.Fprintf(buf, "go object %s %s %s\n", buildcfg.GOOS, buildcfg.GOARCH, buildcfg.Version) + buf.WriteString(objabi.HeaderString()) fmt.Fprintf(buf, "!\n") } |