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>
// 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
}