]> Cypherpunks repositories - gostls13.git/commit
cmd/link: -buildmode=plugin support for linux
authorDavid Crawshaw <crawshaw@golang.org>
Fri, 26 Aug 2016 01:58:45 +0000 (21:58 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Fri, 16 Sep 2016 14:49:13 +0000 (14:49 +0000)
commiteced6754c2f2ce98cb5bacbdbfcbbaa4a6a69d53
tree0450fbe9c27799556daef1148c816e3645c61ccc
parent79167bbd9c71017e18836a3e5e40261b57012358
cmd/link: -buildmode=plugin support for linux

This CL contains several linker changes to support creating plugins.

It collects the exported plugin symbols provided by the compiler and
includes them in the moduledata.

It treats a binary as being dynamically linked if it imports the plugin
package. This lets the dynamic linker de-duplicate symbols.

Change-Id: I099b6f38dda26306eba5c41dbe7862f5a5918d95
Reviewed-on: https://go-review.googlesource.com/27820
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
20 files changed:
src/cmd/link/internal/amd64/asm.go
src/cmd/link/internal/amd64/obj.go
src/cmd/link/internal/arm/asm.go
src/cmd/link/internal/arm/obj.go
src/cmd/link/internal/arm64/obj.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/deadcode.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/go.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/main.go
src/cmd/link/internal/ld/objfile.go
src/cmd/link/internal/ld/sym.go
src/cmd/link/internal/ld/symtab.go
src/cmd/link/internal/s390x/obj.go
src/cmd/link/internal/x86/asm.go
src/cmd/link/internal/x86/obj.go
src/runtime/plugin.go [new file with mode: 0644]
src/runtime/symtab.go