]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] cmd/link: mangle symbol ABI name on Plan 9
authorCherry Mui <cherryyz@google.com>
Wed, 19 May 2021 21:34:19 +0000 (17:34 -0400)
committerCherry Mui <cherryyz@google.com>
Thu, 20 May 2021 19:04:33 +0000 (19:04 +0000)
It is probably not strictly necessary (as we don't support
external linking on Plan 9). Do it for consistency (and less
confusion).

Change-Id: I0b48562061273ccbd4be83db4a981b8e465b1c95
Reviewed-on: https://go-review.googlesource.com/c/go/+/321331
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/symtab.go

index 00f557875a939a0dc1addf0d9319ae64e628b1c0..1f5e333cfd54cd4848f139abf8113e65b825709f 100644 (file)
@@ -300,6 +300,7 @@ func putplan9sym(ctxt *Link, ldr *loader.Loader, s loader.Sym, char SymbolType)
        ctxt.Out.Write8(uint8(t + 0x80)) /* 0x80 is variable length */
 
        name := ldr.SymName(s)
+       name = mangleABIName(ctxt, ldr, s, name)
        ctxt.Out.WriteString(name)
        ctxt.Out.Write8(0)