aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/plugin.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2016-10-30 15:31:21 -0400
committerDavid Crawshaw <crawshaw@golang.org>2016-10-31 04:48:42 +0000
commit9da7058466c8c9f32e1481f28d57732832ee3b30 (patch)
tree4efee9a2f4753fe894765b9f2409b23c4fdfe4fb /src/plugin/plugin.go
parent590fce48849cc7f81b890d6e9b6120fc6681e19a (diff)
downloadgo-9da7058466c8c9f32e1481f28d57732832ee3b30.tar.xz
cmd/link, plugin: use full plugin path for symbols
Plumb the import path of a plugin package through to the linker, and use it as the prefix on the exported symbol names. Before this we used the basename of the plugin file as the prefix, which could conflict and result in multiple loaded plugins sharing symbols that are distinct. Fixes #17155 Fixes #17579 Change-Id: I7ce966ca82d04e8507c0bcb8ea4ad946809b1ef5 Reviewed-on: https://go-review.googlesource.com/32355 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/plugin/plugin.go')
-rw-r--r--src/plugin/plugin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugin/plugin.go b/src/plugin/plugin.go
index 93ae23f3f1..e812a2f677 100644
--- a/src/plugin/plugin.go
+++ b/src/plugin/plugin.go
@@ -18,9 +18,9 @@ package plugin
// Plugin is a loaded Go plugin.
type Plugin struct {
- name string
- loaded chan struct{} // closed when loaded
- syms map[string]interface{}
+ pluginpath string
+ loaded chan struct{} // closed when loaded
+ syms map[string]interface{}
}
// Open opens a Go plugin.