mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd: extract obj's Biobuf code into new bio package
API could still be made more Go-ey. Updates #15165. Change-Id: I514ffceffa43c293ae5d7e5f1e9193fda0098865 Reviewed-on: https://go-review.googlesource.com/21644 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
b17b95301a
commit
4b7e36cdfe
21 changed files with 291 additions and 267 deletions
|
|
@ -15,6 +15,7 @@ import (
|
|||
"cmd/asm/internal/flags"
|
||||
"cmd/asm/internal/lex"
|
||||
|
||||
"cmd/internal/bio"
|
||||
"cmd/internal/obj"
|
||||
)
|
||||
|
||||
|
|
@ -45,9 +46,9 @@ func main() {
|
|||
if *flags.Shared || *flags.Dynlink {
|
||||
ctxt.Flag_shared = 1
|
||||
}
|
||||
ctxt.Bso = obj.Binitw(os.Stdout)
|
||||
ctxt.Bso = bio.BufWriter(os.Stdout)
|
||||
defer ctxt.Bso.Flush()
|
||||
output := obj.Binitw(fd)
|
||||
output := bio.BufWriter(fd)
|
||||
fmt.Fprintf(output, "go object %s %s %s\n", obj.Getgoos(), obj.Getgoarch(), obj.Getgoversion())
|
||||
fmt.Fprintf(output, "!\n")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue