]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: always mark runtime.unreachableMethod symbol
authorCherry Mui <cherryyz@google.com>
Thu, 13 May 2021 20:48:50 +0000 (16:48 -0400)
committerCherry Mui <cherryyz@google.com>
Thu, 13 May 2021 21:16:06 +0000 (21:16 +0000)
commitb4833f7c06c332ad2ef30666144a20fb7838aba1
tree9b5bf6721844186d109ce3de180ae27fec3c2778
parent92c189f2117415ff7a4bd9652422ba9af1745cb9
cmd/link: always mark runtime.unreachableMethod symbol

In the deadcode path we mark runtime.unreachableMethod symbol,
which is a special symbol used for redirecting unreachable
methods. Currently this code is conditioned on not -linkshared.
This is wrong. It should be marked with -linkshared mode as well.

In fact, -linkshared should only affect the entry symbol. Change
the code accordingly.

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