This is not strictly necessary. But as we already do this on
ELF and PE, do it here as well.
Updates #40724.
Change-Id: Ie6e5211aba116634bc9ed82eb8d22a7fed3b7776
Reviewed-on: https://go-review.googlesource.com/c/go/+/307229
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Austin Clements <austin@google.com>
symstr.AddUint8('_')
// replace "·" as ".", because DTrace cannot handle it.
- symstr.Addstring(strings.Replace(ldr.SymExtname(s), "·", ".", -1))
+ name := strings.Replace(ldr.SymExtname(s), "·", ".", -1)
+
+ name = mangleABIName(ldr, s, name)
+ symstr.Addstring(name)
if t := ldr.SymType(s); t == sym.SDYNIMPORT || t == sym.SHOSTOBJ || t == sym.SUNDEFEXT {
symtab.AddUint8(0x01) // type N_EXT, external symbol