1. 09 Oct, 2019 2 commits
    • Cherry Zhang's avatar
      [dev.link] cmd/link, cmd/internal/goobj2: mmap object file in -newobj mode · 0d7404c8
      Cherry Zhang authored
      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: default avatarThan McIntosh <thanm@google.com>
      0d7404c8
    • Cherry Zhang's avatar
      [dev.link] cmd/link: load full symbol contents after deadcode pass · 24950952
      Cherry Zhang authored
      If the new object file format is used, now we load full symbol
      contents after the deadcode pass, for reachable symbols only.
      We still load some informations early, like relocations and the
      contents of type symbols, which are used in the deadcode pass.
      If we rewrite deadcode to use index directly, we could delay more
      of the loading (to sym.Symbol), and perhaps delay the creation of
      sym.Symbol.
      
      TODO: internal linking with host objects doesn't work yet.
      
      Change-Id: I7d4880e8f150e8709ffac277e62191623440e4cf
      Reviewed-on: https://go-review.googlesource.com/c/go/+/197258
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarThan McIntosh <thanm@google.com>
      24950952
  2. 08 Oct, 2019 2 commits
  3. 04 Oct, 2019 23 commits
  4. 03 Oct, 2019 13 commits