aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/plugin.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2023-03-09 16:31:41 +0000
committerKeith Randall <khr@golang.org>2023-03-09 19:19:41 +0000
commit642542cb3c4b672cb34cde44a415c05bf1560a5e (patch)
tree8de0ffba0445a8220cb01ac191f44d8c1048c107 /src/runtime/plugin.go
parentaafc734c7807bafeb8aa69c019494f69965154b0 (diff)
downloadgo-642542cb3c4b672cb34cde44a415c05bf1560a5e.tar.xz
Revert "cmd/link: establish dependable package initialization order"
This reverts commit ce2a609909d9de3391a99a00fe140506f724f933. aka CL 462035 Reason for revert: this CL is causing some problems in some internal Google programs. Change-Id: I4476b8d8d2c3d7b5703d1d85c93baebb4b4e5d26 Reviewed-on: https://go-review.googlesource.com/c/go/+/474976 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/runtime/plugin.go')
-rw-r--r--src/runtime/plugin.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/plugin.go b/src/runtime/plugin.go
index 312802de00..a61dcc3b5d 100644
--- a/src/runtime/plugin.go
+++ b/src/runtime/plugin.go
@@ -7,7 +7,7 @@ package runtime
import "unsafe"
//go:linkname plugin_lastmoduleinit plugin.lastmoduleinit
-func plugin_lastmoduleinit() (path string, syms map[string]any, initTasks []*initTask, errstr string) {
+func plugin_lastmoduleinit() (path string, syms map[string]any, errstr string) {
var md *moduledata
for pmd := firstmoduledata.next; pmd != nil; pmd = pmd.next {
if pmd.bad {
@@ -23,13 +23,13 @@ func plugin_lastmoduleinit() (path string, syms map[string]any, initTasks []*ini
throw("runtime: plugin has empty pluginpath")
}
if md.typemap != nil {
- return "", nil, nil, "plugin already loaded"
+ return "", nil, "plugin already loaded"
}
for _, pmd := range activeModules() {
if pmd.pluginpath == md.pluginpath {
md.bad = true
- return "", nil, nil, "plugin already loaded"
+ return "", nil, "plugin already loaded"
}
if inRange(pmd.text, pmd.etext, md.text, md.etext) ||
@@ -51,7 +51,7 @@ func plugin_lastmoduleinit() (path string, syms map[string]any, initTasks []*ini
for _, pkghash := range md.pkghashes {
if pkghash.linktimehash != *pkghash.runtimehash {
md.bad = true
- return "", nil, nil, "plugin was built with a different version of package " + pkghash.modulename
+ return "", nil, "plugin was built with a different version of package " + pkghash.modulename
}
}
@@ -90,7 +90,7 @@ func plugin_lastmoduleinit() (path string, syms map[string]any, initTasks []*ini
}
syms[name] = val
}
- return md.pluginpath, syms, md.inittasks, ""
+ return md.pluginpath, syms, ""
}
func pluginftabverify(md *moduledata) {