]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: use string map for name lookup
authorCherry Zhang <cherryyz@google.com>
Fri, 18 Oct 2019 16:11:56 +0000 (12:11 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 24 Oct 2019 15:22:31 +0000 (15:22 +0000)
commitdf01b7968bb613d30fa2bbd11fef2f3fb77803a5
treee80b83036f099054744caaa498b5593ee0b8c4f7
parent4adf822fc9457b25aa951ec1f7eab94f5e471614
[dev.link] cmd/link: use string map for name lookup

As we no longer include static symbols into the name lookup table,
it is basically just two maps, one for ABI0, one for ABIInternal.
Just use two maps instead. It may be slightly faster to use
string-keyed maps than struct-keyed maps (still need performance
data to confirm).

For now, allow external symbols being referenced by name, as
external objects don't use index.

Change-Id: I60cedaa7346fce7535970780bc67f93c82160646
Reviewed-on: https://go-review.googlesource.com/c/go/+/201999
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/loader/loader.go