]> Cypherpunks repositories - gostls13.git/commit
cmd/link: canonicalize the "package" of dupok text symbols
authorCherry Zhang <cherryyz@google.com>
Fri, 31 Mar 2017 11:14:16 +0000 (07:14 -0400)
committerCherry Zhang <cherryyz@google.com>
Sun, 2 Apr 2017 03:25:02 +0000 (03:25 +0000)
commita1cedf08428bdb91916bb5317c8413212308048c
tree341d0cbc579e8a883c24baa98603fe5a2fc7ef49
parent78f6622b818cb0198a9c7c45eca58ba6f9f235c5
cmd/link: canonicalize the "package" of dupok text symbols

Dupok symbols may be defined in multiple packages. Its associated
package is chosen sort of arbitrarily (the first containing package
that the linker loads). Canonicalize its package to the package
with which it will be laid down in text, which is the first package
in dependency order that defines the symbol. So later passes (for
example, trampoline insertion pass) know that the dupok symbol
is laid down along with the package.

Fixes #19764.

Change-Id: I7cbc7474ff3016d5069c8b7be04af934abab8bc3
Reviewed-on: https://go-review.googlesource.com/39150
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/link/internal/ld/lib.go
test/fixedbugs/issue19764.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue19764.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue19764.go [new file with mode: 0644]