]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: mangle certain instantiated function name in plugin mode
authorCherry Mui <cherryyz@google.com>
Thu, 1 Jun 2023 21:35:28 +0000 (17:35 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 9 Jun 2023 16:00:05 +0000 (16:00 +0000)
commit5e9b76fe2a1c6709e710c985ae82dff90c847c54
tree813e6da0e1bd8ac9a7e36bf2f79dcff10a5ee4d8
parent6801c27837b44b40aef0878a8a611413ef46e3eb
cmd/link: mangle certain instantiated function name in plugin mode

In plugin mode, we mangle the type symbol name so it doesn't
contain characters that may confuse the external linker. With
generics, instantiated function name includes type names, so it
may also contain such characters and so also needs to be mangled.

Fixes #58800.

Change-Id: Ibb08c95b89b8a815ccef98193d3a025e9d4756cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/500095
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
src/cmd/cgo/internal/testplugin/plugin_test.go
src/cmd/cgo/internal/testplugin/testdata/generic/plugin.go [new file with mode: 0644]
src/cmd/link/internal/ld/lib.go