]> Cypherpunks repositories - gostls13.git/commit
cmd/link, runtime, plugin: versioning
authorDavid Crawshaw <crawshaw@golang.org>
Sat, 12 Nov 2016 11:24:36 +0000 (06:24 -0500)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 15 Nov 2016 16:14:27 +0000 (16:14 +0000)
commit03da2690c9fefdbaff613f9ccc224b5f0abfbe16
tree548d28619823ab21f19ea6be1b35f979ce879396
parenta145890059e9c7aae870e1b9e74b204b6c8bc8d5
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>
misc/cgo/testplugin/altpath/src/common/common.go [new file with mode: 0644]
misc/cgo/testplugin/altpath/src/plugin-mismatch/main.go [new file with mode: 0644]
misc/cgo/testplugin/src/host/host.go
misc/cgo/testplugin/test.bash
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/symtab.go
src/plugin/plugin_dlopen.go
src/runtime/plugin.go
src/runtime/symtab.go