]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: minor fix for -v log
authorCherry Zhang <cherryyz@google.com>
Wed, 13 May 2020 00:16:07 +0000 (20:16 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 13 May 2020 15:44:45 +0000 (15:44 +0000)
Now we no longer create loader.Syms array on most platforms. Use
NSym(), instead of len(Syms), for the number of symbols in -v
log.

Change-Id: I8538c00d9c196b701d154eb7d04d911ee2cad73c
Reviewed-on: https://go-review.googlesource.com/c/go/+/233777
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/main.go

index d22657cf9348369747d263b6acb09ec8a273c094..465a765db83be7c94eed87d938254d90df9ae3a3 100644 (file)
@@ -339,7 +339,7 @@ func Main(arch *sys.Arch, theArch Arch) {
        bench.Start("hostlink")
        ctxt.hostlink()
        if ctxt.Debugvlog != 0 {
-               ctxt.Logf("%d symbols, %d reachable\n", len(ctxt.loader.Syms), ctxt.loader.NReachableSym())
+               ctxt.Logf("%d symbols, %d reachable\n", ctxt.loader.NSym(), ctxt.loader.NReachableSym())
                ctxt.Logf("%d liveness data\n", liveness)
        }
        bench.Start("Flush")