]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: stop Seek file in munmap
authorCherry Zhang <cherryyz@google.com>
Fri, 26 Jun 2020 23:54:00 +0000 (19:54 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 30 Jun 2020 15:55:56 +0000 (15:55 +0000)
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>
src/cmd/link/internal/ld/outbuf_mmap.go

index 41c436e9c9f13aef69137776203b24ac02fb5fde..7280027e92c708c76e55ca44f40b06c52abf1cff 100644 (file)
@@ -38,8 +38,4 @@ func (out *OutBuf) munmap() {
        }
        syscall.Munmap(out.buf)
        out.buf = nil
-       _, err := out.f.Seek(out.off, 0)
-       if err != nil {
-               Exitf("seek output file failed: %v", err)
-       }
 }