diff options
Diffstat (limited to 'ir')
-rw-r--r-- | ir/ir.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -362,8 +362,13 @@ func (f *Function) LinkName() string { func (f *Function) CName() string { name := f.Name() if strings.HasPrefix(name, "_Cfunc_") { + // emitted by `go tool cgo` return name[len("_Cfunc_"):] } + if strings.HasPrefix(name, "C.") { + // created by ../loader/cgo.go + return name[2:] + } return "" } |