]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: convert mangleTypeSym to new style
authorCherry Zhang <cherryyz@google.com>
Sat, 21 Mar 2020 17:50:46 +0000 (13:50 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 24 Mar 2020 16:43:18 +0000 (16:43 +0000)
commited7a4919404e56a7e15b029fed12c88f6e02fb43
tree797ce05d689b4e536867ff51a8b6f47247ca5e09
parentb328ab1d1e245fbf9273b6d6a89871fd9dbf036a
[dev.link] cmd/link: convert mangleTypeSym to new style

Use symbol's Extname, instead of symbol renaming, for the mangled
names.

The old symbol Rename has an interesting logic of "merging"
symbols, when a symbol is renamed to the name of an existing
symbol. It turns out that this is needed for linking against
shared libraries, where the Go object has a reference to a symbol
with the original name, and the shared libary provides a symbol
under the mangled name. Implement this logic with the loader.

Change-Id: Ib95d7a9c93a52f8e02f4a51ac67240d6ebfc1c6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/224939
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/main.go
src/cmd/link/internal/ld/symtab.go
src/cmd/link/internal/loader/loader.go