go/misc/cgo/testshared/testdata
Cherry Zhang 98f8454a73 cmd/link: don't decode type symbol in shared library in deadcode
In the linker's deadcode pass we decode type symbols for
interface satisfaction analysis. When linking against Go shared
libraries, the type symbol may come from a shared library, so it
doesn't have data in the current module being linked, so we cannot
decode it. We already have code to skip DYNIMPORT symbols. However,
this doesn't actually work, because at that point the type symbols'
names haven't been mangled, whereas they may be mangled in the
shared library. So the symbol definition (in shared library) and
reference (in current module) haven't been connected.

Skip decoding type symbols of type Sxxx (along with DYNIMPORT)
when linkShared.

Note: we cannot skip all type symbols, as we still need to mark
unexported methods defined in the current module.

Fixes #44031.

Change-Id: I833d19a060c94edbd6fc448172358f9a7d760657
Reviewed-on: https://go-review.googlesource.com/c/go/+/288496
Trust: Cherry Zhang <cherryyz@google.com>
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2021-02-02 16:00:58 +00:00
..
dep2 misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
dep3 misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
depBase misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
division misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
exe misc/cgo: gofmt testdata files 2019-03-22 07:21:24 +00:00
exe2 misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
exe3 misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
execgo misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
explicit misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
gcdata cmd/link: fix GC data reading from shared library (attempt 2) 2020-07-01 14:41:56 +00:00
global misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
globallib misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
iface misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
iface_a misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
iface_b misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
iface_i misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
implicit misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
implicitcmd misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
issue25065 misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00
issue30768 cmd/link: put shlib ".type" functions in internal ABI 2019-07-15 22:54:39 +00:00
issue39777 cmd/link: skip zero values in fingerprint check 2020-06-23 18:38:32 +00:00
issue44031 cmd/link: don't decode type symbol in shared library in deadcode 2021-02-02 16:00:58 +00:00
trivial misc/cgo/testshared: fix tests in module mode 2019-02-22 21:57:16 +00:00