]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/x86: handle global reference in From3 in dynlink mode
authorCherry Mui <cherryyz@google.com>
Wed, 19 Nov 2025 22:32:12 +0000 (17:32 -0500)
committerCherry Mui <cherryyz@google.com>
Thu, 20 Nov 2025 19:05:03 +0000 (11:05 -0800)
commit4b740af56a864eeaf3504d7f873c3d3cb3fcd72e
treeb8b76385856dd01de84d78cd0c47e259bb921dc1
parent790384c6c23f7ce44199ea3cd61c856d632b08aa
cmd/internal/obj/x86: handle global reference in From3 in dynlink mode

In dynlink mode, we rewrite reference to a global variable to
a load from the GOT. Currently this code does not handle the case
that the global reference is in From3 of a Prog. Most instructions
don't expect a memory operand in From3, but some do, like
VGF2P8AFFINEQB. Handle this case.

Change-Id: Ibb6773606e6967bcc629d9ef5dac6e050f4008ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/722181
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
src/cmd/asm/internal/asm/testdata/amd64dynlinkerror.s
src/cmd/internal/obj/x86/obj6.go