[dev.link] cmd/link: move some work after deadcode

This is in preparation of delaying loading symbol content to
after dead code elimination.

Change-Id: Ia4ce82d9a42cc1a76c82f6d0eb9a54b0325ee3ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/197061
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
Cherry Zhang 2019-09-23 22:44:02 -04:00
parent 6051fd0ad9
commit e63c1df348
2 changed files with 179 additions and 177 deletions

View file

@ -208,9 +208,10 @@ func Main(arch *sys.Arch, theArch Arch) {
}
ctxt.loadlib()
ctxt.dostrdata()
deadcode(ctxt)
//ctxt.dumpsyms() // XXX
ctxt.linksetup()
ctxt.dostrdata()
dwarfGenerateDebugInfo(ctxt)
if objabi.Fieldtrack_enabled != 0 {
fieldtrack(ctxt)