pkgpath

Imports

Imports #

"bytes"
"errors"
"fmt"
"os"
"os/exec"
"strings"

Constants & Variables

mangleCheckCode const #

mangleCheckCode is the package we compile to determine the mangling scheme.

const mangleCheckCode = `
package läufer
func Run(x int) int {
  return 1
}
`

v3UnderscoreCodes var #

v3UnderscoreCodes maps from a character that supports an underscore encoding to the underscore encoding character.

var v3UnderscoreCodes = map[byte]byte{...}

Functions

ToSymbolFunc function #

ToSymbolFunc returns a function that may be used to convert a package path into a string suitable for use as a symbol. cmd is the gccgo/GoLLVM compiler in use, and tmpdir is a temporary directory to pass to os.CreateTemp(). For example, this returns a function that converts "net/http" into a string like "net..z2fhttp". The actual string varies for different gccgo/GoLLVM versions, which is why this returns a function that does the conversion appropriate for the compiler in use.

func ToSymbolFunc(cmd string, tmpdir string) (func(string) string, error)

toSymbolV1 function #

toSymbolV1 converts a package path using the original mangling scheme.

func toSymbolV1(ppath string) string

toSymbolV2 function #

toSymbolV2 converts a package path using the second mangling scheme.

func toSymbolV2(ppath string) string

toSymbolV3 function #

toSymbolV3 converts a package path using the third mangling scheme.

func toSymbolV3(ppath string) string

Generated with Arrow