[dev.link] cmd/link, cmd/internal/goobj2: mmap object file in -newobj mode
With the old object file format, we use mmap (if supported) to read object files and back symbol data with mapped read-only memory. Do the same with the new object file format. This also significantly reduces number of syscalls made to read object files. Currently we still do mmap in object file level, not archive level. This is probably ok, as there shouldn't be many archives that contain more than one object. If this is a problem we can change that later. Change-Id: Icae3ef14d8ed6adbee1b5b48d420e2af22fd9604 Reviewed-on: https://go-review.googlesource.com/c/go/+/197797 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:Than McIntosh <thanm@google.com>
Showing
Please register or sign in to comment