[dev.link] cmd/link: remove buffered file I/O from OutBuf

Change-Id: I72b1e57631fe4a31597fd0452ee1beb14378febb
Reviewed-on: https://go-review.googlesource.com/c/go/+/228317
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Jeremy Faller 2020-04-15 13:23:29 -04:00
parent 95a5a0dee9
commit b2def42d9e
15 changed files with 41 additions and 135 deletions

View file

@ -204,7 +204,6 @@ func asmb2(ctxt *ld.Link) {
ctxt.Out.SeekSet(int64(symo))
ld.Asmelfsym(ctxt)
ctxt.Out.Flush()
ctxt.Out.Write(ld.Elfstrdat)
if ctxt.LinkMode == ld.LinkExternal {
@ -220,7 +219,6 @@ func asmb2(ctxt *ld.Link) {
ld.Asmbelf(ctxt, int64(symo))
}
ctxt.Out.Flush()
if *ld.FlagC {
fmt.Printf("textsize=%d\n", ld.Segtext.Filelen)
fmt.Printf("datsize=%d\n", ld.Segdata.Filelen)