]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ppc64: support non-PIC PLT call stubs
authorPaul E. Murphy <murp@ibm.com>
Mon, 24 Apr 2023 20:59:17 +0000 (15:59 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 3 May 2023 22:13:51 +0000 (22:13 +0000)
commitf742ddc349723667fc9af5d0f16233f7762aeaa0
treef708e88197a353327f890ffcdaea00804f103f60
parent767fbe01aeb32d8fe72bb40fa0cc144a7263045b
cmd/link/internal/ppc64: support non-PIC PLT call stubs

Simplify the PLT stub generation code to minimize stub generation
knowing there is only ever a single TOC pointer when linking
internally.

The OpenBSD port requires Go make dynamic calls into its C library,
so the linker must create stubs which work without R2 being set up.
This new case is exactly case 3 described in the PPC64 ELFv2 1.5
section 4.2.5.3.

Updates #56001

Change-Id: I07ebd08442302e55b94b57db474dfd7e7a0c2ac9
Reviewed-on: https://go-review.googlesource.com/c/go/+/488316
Auto-Submit: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/cmd/link/internal/ppc64/asm.go