]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: load full symbol contents after deadcode pass
authorCherry Zhang <cherryyz@google.com>
Tue, 24 Sep 2019 21:31:12 +0000 (17:31 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 9 Oct 2019 16:05:40 +0000 (16:05 +0000)
commit24950952759cb26144333b0a47eae7da44808eec
tree9246ba38dca5990ab0208443b88626c3e3f79a1f
parent48151b3f0ffda8a38ca71c8f1b8a72d5f90d7061
[dev.link] cmd/link: load full symbol contents after deadcode pass

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: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/deadcode.go
src/cmd/link/internal/ld/go.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/main.go
src/cmd/link/internal/objfile/objfile2.go