aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime/iface.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-08-31 03:01:15 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-08-31 03:01:15 +0000
commitc70ff9f9be0c7360a37519ec68ac4dd41e8d0a3c (patch)
tree2a189fbed2324d7708bfe231203bd294028057c9 /libgo/go/runtime/iface.go
parente7c8f75569e792f81a4f4ceee4e1b20f2544e7a4 (diff)
downloadgcc-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/iface.go')
-rw-r--r--libgo/go/runtime/iface.go29
1 files changed, 14 insertions, 15 deletions
diff --git a/libgo/go/runtime/iface.go b/libgo/go/runtime/iface.go
index d434f9e..3fa5dd6 100644
--- a/libgo/go/runtime/iface.go
+++ b/libgo/go/runtime/iface.go
@@ -10,23 +10,22 @@ import (
"unsafe"
)
-// For gccgo, use go:linkname to rename compiler-called functions to
-// themselves, so that the compiler will export them.
+// For gccgo, use go:linkname to export compiler-called functions.
//
-//go:linkname requireitab runtime.requireitab
-//go:linkname assertitab runtime.assertitab
-//go:linkname panicdottype runtime.panicdottype
-//go:linkname ifaceE2E2 runtime.ifaceE2E2
-//go:linkname ifaceI2E2 runtime.ifaceI2E2
-//go:linkname ifaceE2I2 runtime.ifaceE2I2
-//go:linkname ifaceI2I2 runtime.ifaceI2I2
-//go:linkname ifaceE2T2P runtime.ifaceE2T2P
-//go:linkname ifaceI2T2P runtime.ifaceI2T2P
-//go:linkname ifaceE2T2 runtime.ifaceE2T2
-//go:linkname ifaceI2T2 runtime.ifaceI2T2
-//go:linkname ifaceT2Ip runtime.ifaceT2Ip
+//go:linkname requireitab
+//go:linkname assertitab
+//go:linkname panicdottype
+//go:linkname ifaceE2E2
+//go:linkname ifaceI2E2
+//go:linkname ifaceE2I2
+//go:linkname ifaceI2I2
+//go:linkname ifaceE2T2P
+//go:linkname ifaceI2T2P
+//go:linkname ifaceE2T2
+//go:linkname ifaceI2T2
+//go:linkname ifaceT2Ip
// Temporary for C code to call:
-//go:linkname getitab runtime.getitab
+//go:linkname getitab
// The gccgo itab structure is different than the gc one.
//