]> Cypherpunks repositories - gostls13.git/commit
cmd/link: don't mark a symbol's GoType reachable when -linkshared
authorCherry Zhang <cherryyz@google.com>
Fri, 18 Sep 2020 15:56:43 +0000 (11:56 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 18 Sep 2020 19:41:09 +0000 (19:41 +0000)
commit7e54aa2c25690f5a7f5baad112d231b6ff8d4e5e
tree1c15b3fcb7ab069fc3563eba7c9389910db976d2
parentd91d0762c7757c12c7d5f9e2ae3f170d5bd7ba84
cmd/link: don't mark a symbol's GoType reachable when -linkshared

In CL 231397, we stopped marking symbols' GoType reachable in
general, but not when -linkshared. It was left as a TODO. This CL
addresses it.

The problem was that the type names are mangled in the shared
library, so we need to mangle the name consistently in the
executable as well (regardless of whether the symbol is reachable
or not), so that the GCProg generation code can find the
corresponding symbol from the shared library.

Change-Id: I1040747402929a983ec581109f1681a77893682e
Reviewed-on: https://go-review.googlesource.com/c/go/+/255964
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/link/internal/ld/deadcode.go
src/cmd/link/internal/ld/lib.go