]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/compile, cmd/link: generate itablink at link time
authorCherry Zhang <cherryyz@google.com>
Thu, 30 Jul 2020 21:19:13 +0000 (17:19 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 3 Aug 2020 21:13:25 +0000 (21:13 +0000)
commitdb924fd99e85e483def6dec1847d9527a93aaafb
treeca185529f82065eabf0e80750df0c6f9b6c0303d
parentf204ca305128ad1b500d3ba77aebf5509509a8fc
[dev.link] cmd/compile, cmd/link: generate itablink at link time

Currently, at compile time, for each itab symbol, we create an
"itablink" symbol which holds solely the address of the itab
symbol. At link time, all the itablink symbols are grouped
together to form the itablinks slice.

This CL removes the itablink symbols, and directly generate the
itablinks slice in the linker. This removes a number of symbols,
which are dupOK and generally have long names. And also removes
a special handling of itablink symbols in the deadcode pass which
iterates through all symbols.

Change-Id: I475c3c8899e9fbeec9abc7647b1e4a69aa5c3c5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/245901
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/cmd/internal/goobj2/objfile.go
src/cmd/internal/obj/objfile2.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/deadcode.go
src/cmd/link/internal/ld/symtab.go
src/cmd/link/internal/ld/typelink.go
src/cmd/link/internal/ld/xcoff.go
src/cmd/link/internal/loader/loader.go