From f99f5da18fdebe5ce73839604541f17f4e2bfd88 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Thu, 14 Nov 2024 15:25:33 -0600 Subject: [PATCH] cmd/internal/obj/fips: mark R_ADDRPOWR_GOT as a pcrel relocation 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 LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Reviewed-by: Cherry Mui --- src/cmd/internal/obj/fips.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/internal/obj/fips.go b/src/cmd/internal/obj/fips.go index 6505ce79ee..a1ac4aac2a 100644 --- a/src/cmd/internal/obj/fips.go +++ b/src/cmd/internal/obj/fips.go @@ -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, -- 2.48.1