aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/objfile.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2019-09-11 16:11:31 -0400
committerCherry Zhang <cherryyz@google.com>2019-10-01 20:28:45 +0000
commitcd75cf4bc02a741f7b59e30dd1170364000fd134 (patch)
treec22eb707953f8173128a69062c54e9a98f3bd032 /src/cmd/internal/obj/objfile.go
parentdc8453964a519032bfd338a2cc027d038c9b2e79 (diff)
downloadgo-cd75cf4bc02a741f7b59e30dd1170364000fd134.tar.xz
[dev.link] cmd/compile, cmd/asm: use bio.Writer for object file writing
It is convenient to have a seekable writer. A later CL will make use of Seek. Change-Id: Iba0107ce2975d9a451d97f16aa91a318dd4c90e2 Reviewed-on: https://go-review.googlesource.com/c/go/+/196028 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/objfile.go')
-rw-r--r--src/cmd/internal/obj/objfile.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go
index ab5627c0dd..c51a11c51f 100644
--- a/src/cmd/internal/obj/objfile.go
+++ b/src/cmd/internal/obj/objfile.go
@@ -8,6 +8,7 @@ package obj
import (
"bufio"
+ "cmd/internal/bio"
"cmd/internal/dwarf"
"cmd/internal/objabi"
"cmd/internal/sys"
@@ -80,7 +81,8 @@ func newObjWriter(ctxt *Link, b *bufio.Writer, pkgpath string) *objWriter {
}
}
-func WriteObjFile(ctxt *Link, b *bufio.Writer, pkgpath string) {
+func WriteObjFile(ctxt *Link, bout *bio.Writer, pkgpath string) {
+ b := bout.Writer
w := newObjWriter(ctxt, b, pkgpath)
// Magic header