]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: add symbols to Textp after deadcode pass
authorCherry Zhang <cherryyz@google.com>
Tue, 24 Sep 2019 22:12:55 +0000 (18:12 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 8 Oct 2019 19:15:46 +0000 (19:15 +0000)
commit48151b3f0ffda8a38ca71c8f1b8a72d5f90d7061
tree1cc5d1c67e04f521a8545bc4f80576d546d083f4
parentfcfbe25dca8525257a2c265e6bd825b5c4062c6c
[dev.link] cmd/link: add symbols to Textp after deadcode pass

Currently we add all text symbols to ctxt.Textp at load time,
then the deadcode pass filters out unreachable ones. This CL
delays adding symbols to ctxt.Textp to the end of the deadcode
pass, where we only add reachable ones.

Change-Id: Ie83b2958f915c5aaa004b8c5ed1f1bc275f4d1db
Reviewed-on: https://go-review.googlesource.com/c/go/+/197257
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/lib.go