diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-08-31 03:01:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-08-31 03:01:15 +0000 |
commit | c70ff9f9be0c7360a37519ec68ac4dd41e8d0a3c (patch) | |
tree | 2a189fbed2324d7708bfe231203bd294028057c9 /libgo/go/runtime/runtime1.go | |
parent | e7c8f75569e792f81a4f4ceee4e1b20f2544e7a4 (diff) | |
download | gcc-c70ff9f9be0c7360a37519ec68ac4dd41e8d0a3c.zip gcc-c70ff9f9be0c7360a37519ec68ac4dd41e8d0a3c.tar.gz gcc-c70ff9f9be0c7360a37519ec68ac4dd41e8d0a3c.tar.bz2 |
compiler, runtime: support and use single argument go:linkname
The gc compiler has started permitting go:linkname comments with a
single argument to mean that a function should be externally visible
outside the package. Implement this in the Go frontend.
Change the libgo runtime package to use it, rather than repeating the
name just to export a function.
Remove a couple of unnecessary go:linkname comments on declarations.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192197
From-SVN: r275239
Diffstat (limited to 'libgo/go/runtime/runtime1.go')
-rw-r--r-- | libgo/go/runtime/runtime1.go | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libgo/go/runtime/runtime1.go b/libgo/go/runtime/runtime1.go index 2424f20..d9309cc 100644 --- a/libgo/go/runtime/runtime1.go +++ b/libgo/go/runtime/runtime1.go @@ -11,16 +11,15 @@ import ( ) // For gccgo, while we still have C runtime code, use go:linkname to -// rename some functions to themselves, so that the compiler will -// export them. +// export some functions to themselves. // -//go:linkname gotraceback runtime.gotraceback -//go:linkname args runtime.args -//go:linkname goargs runtime.goargs -//go:linkname check runtime.check -//go:linkname goenvs_unix runtime.goenvs_unix -//go:linkname parsedebugvars runtime.parsedebugvars -//go:linkname timediv runtime.timediv +//go:linkname gotraceback +//go:linkname args +//go:linkname goargs +//go:linkname check +//go:linkname goenvs_unix +//go:linkname parsedebugvars +//go:linkname timediv // Keep a cached value to make gotraceback fast, // since we call it on every call to gentraceback. |