]> Cypherpunks repositories - gostls13.git/commit
cmd/link: type symbol name mangling for plugins
authorDavid Crawshaw <crawshaw@golang.org>
Sat, 30 Sep 2017 12:36:34 +0000 (12:36 +0000)
committerDavid Crawshaw <crawshaw@golang.org>
Thu, 5 Oct 2017 09:51:31 +0000 (09:51 +0000)
commit24e4a128c9a038a221789fb8ff40530acde31501
tree89e87e8de04408e1bb63f464b4bdbf183deb75a0
parentbe272ec0712734fd7d03fcad8a9b8a546b08d6fc
cmd/link: type symbol name mangling for plugins

Moves type symbol name mangling out of the object reader
and into a separate pass. Requires some care, as changing
the name of a type may require dealing with duplicate
symbols for the first time.

Disables DWARF for both plugins and programs that use plugin.Open,
because type manging is currently incompatible with the go.info.*
symbol generator in cmd/link. (It relies on the symbol names to
find type information.) A future fix for this would be moving the
go.info.* generation into the compiler, with the logic we use
for generating the type.* symbols.

Fixes #19529

Change-Id: I75615f8bdda86ff9e767e536d9aa36e15c194098
Reviewed-on: https://go-review.googlesource.com/67312
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testplugin/src/issue19529/plugin.go [new file with mode: 0644]
misc/cgo/testplugin/test.bash
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/objfile.go
src/cmd/link/internal/ld/symbols.go