mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
19470dc535
commit
cef3a442ea
2 changed files with 6 additions and 19 deletions
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue