]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/ssagen: stop canonicalizing symabis
authorMatthew Dempsky <mdempsky@google.com>
Sun, 27 Aug 2023 21:42:26 +0000 (14:42 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 29 Aug 2023 18:31:12 +0000 (18:31 +0000)
cmd/asm writes canonicalized symabis now.

Change-Id: I65cc39ce1671a3c225f14003b336015f0cc33980
Reviewed-on: https://go-review.googlesource.com/c/go/+/523339
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/ssagen/abi.go

index a5f1a2db60b254dc8ae794754de401936d283aa1..f65fe497ec3787acec33e7c0e5802fbc09a244f0 100644 (file)
@@ -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
 }