diff options
Diffstat (limited to 'src/cmd/compile/internal/gc/gen.go')
-rw-r--r-- | src/cmd/compile/internal/gc/gen.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/gc/gen.go b/src/cmd/compile/internal/gc/gen.go index f9b4584cf6..43d12925eb 100644 --- a/src/cmd/compile/internal/gc/gen.go +++ b/src/cmd/compile/internal/gc/gen.go @@ -11,7 +11,18 @@ import ( "strconv" ) +// sysfunc looks up Go function name in package runtime. This function +// must follow the internal calling convention. func sysfunc(name string) *obj.LSym { + s := Runtimepkg.Lookup(name) + s.SetFunc(true) + return s.Linksym() +} + +// sysvar looks up a variable (or assembly function) name in package +// runtime. If this is a function, it may have a special calling +// convention. +func sysvar(name string) *obj.LSym { return Runtimepkg.Lookup(name).Linksym() } |