]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/amd64: always generate R_X86_64_PLT32 for SDYNIMPORT calls
authorJoel Sing <joel@sing.id.au>
Thu, 26 Nov 2020 15:06:08 +0000 (02:06 +1100)
committerJoel Sing <joel@sing.id.au>
Tue, 1 Dec 2020 05:09:44 +0000 (05:09 +0000)
commita36ba090fd647e741668629527e25c657c40f8f3
treee9abb80998a4e1aeec9f7e27aa600f5239159a1b
parentf3741bdf7cab5fc8254bebce00479c0168ace86c
cmd/link/internal/amd64: always generate R_X86_64_PLT32 for SDYNIMPORT calls

Currently, in the non-DynlinkingGo case with external linking, we generate a
R_X86_64_GOTPCREL relocation for the imported symbol. This results in the
external linker turning this into a R_X86_64_GLOB_DAT relocation, rather
than a R_X86_64_JUMP_SLOT. Always generate R_X86_64_PLT32 for SDYNIMPORT
calls so that these calls work correctly.

Update #36435
Fixes #42671

Change-Id: I8a28884b7853cb4135053ed817bedc919482f4ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/270377
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/amd64/asm.go