mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[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:
parent
95a5a0dee9
commit
b2def42d9e
15 changed files with 41 additions and 135 deletions
|
|
@ -646,7 +646,6 @@ func asmb2(ctxt *ld.Link) {
|
|||
default:
|
||||
if ctxt.IsELF {
|
||||
ld.Asmelfsym(ctxt)
|
||||
ctxt.Out.Flush()
|
||||
ctxt.Out.Write(ld.Elfstrdat)
|
||||
|
||||
if ctxt.LinkMode == ld.LinkExternal {
|
||||
|
|
@ -656,13 +655,11 @@ func asmb2(ctxt *ld.Link) {
|
|||
|
||||
case objabi.Hplan9:
|
||||
ld.Asmplan9sym(ctxt)
|
||||
ctxt.Out.Flush()
|
||||
|
||||
sym := ctxt.Syms.Lookup("pclntab", 0)
|
||||
if sym != nil {
|
||||
ld.Lcsize = int32(len(sym.P))
|
||||
ctxt.Out.Write(sym.P)
|
||||
ctxt.Out.Flush()
|
||||
}
|
||||
|
||||
case objabi.Hwindows:
|
||||
|
|
@ -702,6 +699,4 @@ func asmb2(ctxt *ld.Link) {
|
|||
case objabi.Hwindows:
|
||||
ld.Asmbpe(ctxt)
|
||||
}
|
||||
|
||||
ctxt.Out.Flush()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue