]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make sure linkname'd symbol is non-package
authorCherry Zhang <cherryyz@google.com>
Sat, 7 Nov 2020 03:46:18 +0000 (22:46 -0500)
committerCherry Zhang <cherryyz@google.com>
Mon, 9 Nov 2020 16:09:16 +0000 (16:09 +0000)
commita444458112e4059e73c9a5a2bc5867f53bf9faa2
tree8bc0141a186b88074b93b7435a1db0fe451acd22
parent979e1376096a4c1c7525f33dd4e76414f63c93fb
cmd/compile: make sure linkname'd symbol is non-package

When a variable symbol is both imported (possibly through
inlining) and linkname'd, make sure its LSym is marked as
non-package for symbol indexing in the object file, so it is
resolved by name and dedup'd with the original definition.

Fixes #42401.

Change-Id: I8e90c0418c6f46a048945c5fdc06c022b77ed68d
Reviewed-on: https://go-review.googlesource.com/c/go/+/268178
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/compile/internal/gc/gsubr.go
test/fixedbugs/issue42401.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue42401.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue42401.go [new file with mode: 0644]