aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/ld/pcln.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/link/internal/ld/pcln.go')
-rw-r--r--src/cmd/link/internal/ld/pcln.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/link/internal/ld/pcln.go b/src/cmd/link/internal/ld/pcln.go
index 8708924d92..ed1b523b4e 100644
--- a/src/cmd/link/internal/ld/pcln.go
+++ b/src/cmd/link/internal/ld/pcln.go
@@ -11,6 +11,7 @@ import (
"log"
"os"
"path/filepath"
+ "strings"
)
// iteration over encoded pcdata tables.
@@ -162,13 +163,15 @@ func renumberfiles(ctxt *Link, files []*sym.Symbol, d *sym.Pcdata) {
*d = out
}
-// onlycsymbol reports whether this is a cgo symbol provided by the
-// runtime and only used from C code.
+// onlycsymbol reports whether this is a symbol that is referenced by C code.
func onlycsymbol(s *sym.Symbol) bool {
switch s.Name {
case "_cgo_topofstack", "_cgo_panic", "crosscall2":
return true
}
+ if strings.HasPrefix(s.Name, "_cgoexp_") {
+ return true
+ }
return false
}