diff options
| author | David Crawshaw <crawshaw@golang.org> | 2016-11-12 06:24:36 -0500 |
|---|---|---|
| committer | David Crawshaw <crawshaw@golang.org> | 2016-11-15 16:14:27 +0000 |
| commit | 03da2690c9fefdbaff613f9ccc224b5f0abfbe16 (patch) | |
| tree | 548d28619823ab21f19ea6be1b35f979ce879396 /misc/cgo/testplugin/test.bash | |
| parent | a145890059e9c7aae870e1b9e74b204b6c8bc8d5 (diff) | |
| download | go-03da2690c9fefdbaff613f9ccc224b5f0abfbe16.tar.xz | |
cmd/link, runtime, plugin: versioning
In plugins and every program that opens a plugin, include a hash of
every imported package.
There are two versions of each hash: one local and one exported.
As the program starts and plugins are loaded, the first exported
symbol for each package becomes the canonical version.
Any subsequent plugin's local package hash symbol has to match the
canonical version.
Fixes #17832
Change-Id: I4e62c8e1729d322e14b1673bada40fa7a74ea8bc
Reviewed-on: https://go-review.googlesource.com/33161
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'misc/cgo/testplugin/test.bash')
| -rwxr-xr-x | misc/cgo/testplugin/test.bash | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/misc/cgo/testplugin/test.bash b/misc/cgo/testplugin/test.bash index 322d43901d..bba46b51c6 100755 --- a/misc/cgo/testplugin/test.bash +++ b/misc/cgo/testplugin/test.bash @@ -24,6 +24,7 @@ mkdir sub GOPATH=$(pwd) go build -buildmode=plugin plugin1 GOPATH=$(pwd) go build -buildmode=plugin plugin2 +GOPATH=$(pwd)/altpath go build -buildmode=plugin plugin-mismatch GOPATH=$(pwd) go build -buildmode=plugin -o=sub/plugin1.so sub/plugin1 GOPATH=$(pwd) go build host |
