]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: don't mangle string symbol names
authorCherry Mui <cherryyz@google.com>
Fri, 18 Aug 2023 15:10:23 +0000 (11:10 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 18 Aug 2023 15:53:47 +0000 (15:53 +0000)
commitb65e34f03814889f0edd3ddd9778864762511443
tree3d7ad001b1fb162effb8a716931d0909750233e8
parentd63c88d6959f2081bcaf4026306ca8878e8f335a
cmd/link: don't mangle string symbol names

String symbol names could contain weird characters as we put the
string literal into the symbol name. So it may appear to need
mangling. However, as string symbols are grouped into a single
"go:string.*" symbol, the individual symbol names actually don't
matter. So don't mangle them.

Also make the mangling code more defensive in case of weird
symbol names.

Fixes #62098.

Change-Id: I533012567a9fffab69debda934f426421c7abb04
Reviewed-on: https://go-review.googlesource.com/c/go/+/520856
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/cgo/internal/testplugin/plugin_test.go
src/cmd/cgo/internal/testplugin/testdata/mangle/plugin.go [moved from src/cmd/cgo/internal/testplugin/testdata/generic/plugin.go with 57% similarity]
src/cmd/link/internal/ld/lib.go