]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/fips: mark R_ADDRPOWR_GOT as a pcrel relocation
authorPaul E. Murphy <murp@ibm.com>
Thu, 14 Nov 2024 21:25:33 +0000 (15:25 -0600)
committerGopher Robot <gobot@golang.org>
Thu, 14 Nov 2024 22:29:26 +0000 (22:29 +0000)
It's actually a TOC relative relocation, but those are also accepted
as pcrel relocations here too. This fixes compilation on GOPPC64 <= power9.

Change-Id: I235125a76f59ab26c6c753540cfaeb398f9c105d
Reviewed-on: https://go-review.googlesource.com/c/go/+/628157
Auto-Submit: Paul Murphy <murp@ibm.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/internal/obj/fips.go

index 6505ce79ee1bba946cc0eb807404f18ad05ce49c..a1ac4aac2a2136ceb98a4be10ed9530c8fa521ff 100644 (file)
@@ -317,6 +317,7 @@ func (s *LSym) checkFIPSReloc(ctxt *Link, rel Reloc) {
                objabi.R_ADDRMIPSU, // used by adding to REGSB, so position-independent
                objabi.R_ADDRMIPSTLS,
                objabi.R_ADDROFF,
+               objabi.R_ADDRPOWER_GOT,
                objabi.R_ADDRPOWER_GOT_PCREL34,
                objabi.R_ADDRPOWER_PCREL,
                objabi.R_ADDRPOWER_TOCREL,