From 98c26afa8c9c1016d205408e2afaba5824f4d930 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Sun, 27 Aug 2023 14:42:26 -0700 Subject: [PATCH] cmd/compile/internal/ssagen: stop canonicalizing symabis cmd/asm writes canonicalized symabis now. Change-Id: I65cc39ce1671a3c225f14003b336015f0cc33980 Reviewed-on: https://go-review.googlesource.com/c/go/+/523339 Auto-Submit: Matthew Dempsky Reviewed-by: Cherry Mui Run-TryBot: Matthew Dempsky TryBot-Result: Gopher Robot --- src/cmd/compile/internal/ssagen/abi.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cmd/compile/internal/ssagen/abi.go b/src/cmd/compile/internal/ssagen/abi.go index a5f1a2db60..f65fe497ec 100644 --- a/src/cmd/compile/internal/ssagen/abi.go +++ b/src/cmd/compile/internal/ssagen/abi.go @@ -41,12 +41,8 @@ func NewSymABIs() *SymABIs { // both to use the full path, which matches compiler-generated linker // symbol names. func (s *SymABIs) canonicalize(linksym string) string { - // If the symbol is already prefixed with "", rewrite it to start - // with LocalPkg.Prefix. - // - // TODO(mdempsky): Have cmd/asm stop writing out symbols like this. if strings.HasPrefix(linksym, `"".`) { - return types.LocalPkg.Prefix + linksym[2:] + panic("non-canonical symbol name: " + linksym) } return linksym } -- 2.50.0