commit | 364d3205045b694a6c89a8d9ad932e7c105d0f6c | [log] [tgz] |
---|---|---|
author | Cherry Zhang <cherryyz@google.com> | Fri Jun 26 19:54:00 2020 -0400 |
committer | Cherry Zhang <cherryyz@google.com> | Tue Jun 30 15:55:56 2020 +0000 |
tree | 5028c7aa28c361dc9c9f5699ce856d1a43182049 | |
parent | b473a1f8da2998be9dee2b0e59a6854a4955dba1 [diff] |
[dev.link] cmd/link: stop Seek file in munmap If mmap is used, we don't do file I/O anymore, so no need to Seek in the file either. Change-Id: Ic8350eb66404398420df18560f6a7acbb3fcf7e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/240398 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/src/cmd/link/internal/ld/outbuf_mmap.go b/src/cmd/link/internal/ld/outbuf_mmap.go index 41c436e..7280027 100644 --- a/src/cmd/link/internal/ld/outbuf_mmap.go +++ b/src/cmd/link/internal/ld/outbuf_mmap.go
@@ -38,8 +38,4 @@ } syscall.Munmap(out.buf) out.buf = nil - _, err := out.f.Seek(out.off, 0) - if err != nil { - Exitf("seek output file failed: %v", err) - } }