]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/compile, cmd/link: make itab symbols content-addressable
authorCherry Zhang <cherryyz@google.com>
Wed, 29 Jul 2020 22:10:15 +0000 (18:10 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 3 Aug 2020 21:12:28 +0000 (21:12 +0000)
commitcecb7a1cf31e8d8991669208e584269db32066c9
treeb4e10a42e5b59ab7f6a544f66f60d36784d884ea
parent69748f0ce4faf850a2e25641aed23e646556d616
[dev.link] cmd/compile, cmd/link: make itab symbols content-addressable

Extend the content-addressable symbol mechanism to itab symbols.
Itab symbols require global uniqueness (as at run time we compare
pointers), so it needs to be reliably deduplicated. Currently the
content hash depends on symbol name expansion, so we can only do
this when all Go packages are built with know package paths. Fall
back to checking names if any Go package is built with unknown
package path.

Change-Id: Icf5e8873755050c20e5fc6549f6de1c883254c89
Reviewed-on: https://go-review.googlesource.com/c/go/+/245719
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/cmd/internal/obj/objfile2.go
src/cmd/link/internal/loader/loader.go