aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir
diff options
context:
space:
mode:
Diffstat (limited to 'ir')
-rw-r--r--ir/ir.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/ir/ir.go b/ir/ir.go
index 91822695d..242755abe 100644
--- a/ir/ir.go
+++ b/ir/ir.go
@@ -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 ""
}