]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/internal/obj: use index for static symbols
authorCherry Zhang <cherryyz@google.com>
Fri, 18 Oct 2019 14:30:04 +0000 (10:30 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 21 Oct 2019 21:57:32 +0000 (21:57 +0000)
commitd56c8149ac3b6c8c074d46853ce8c7b4e03d4b0f
tree200192156c79cf47529dff2ab5c999b1bac39300
parent4fa524b7762d01fe2f7cb1db3297ff9759410451
[dev.link] cmd/internal/obj: use index for static symbols

In assembly we always reference symbols by name. But for static
symbols, as they are reachable only within the current file, we
can assign them local indices and use the indices to reference
them. The index is only meaningful locally, and it is fine.

Change-Id: I16e011cd41575ef703ceb6f35899e5fa58fbcf1e
Reviewed-on: https://go-review.googlesource.com/c/go/+/201997
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/internal/obj/sym.go