]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, cmd/link: FIPS fixes for large programs
authorRuss Cox <rsc@golang.org>
Fri, 22 Nov 2024 01:03:18 +0000 (20:03 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 22 Nov 2024 14:16:18 +0000 (14:16 +0000)
commit00709919d09904b17cfe3bfeb35521cbd3fb04f8
treee98368034c8e632060db5b1cd42059fc6559c8e8
parent4865aadc21acebc8039f914929f03c7042b2ae8d
cmd/compile, cmd/link: FIPS fixes for large programs

1. In cmd/internal/obj, only apply the exclusion list to data symbols.
   Text symbols are always fine since they can use PC-relative relocations.

2. In cmd/link, only skip trampolines for text symbols in the same package
   with the same type. Before, all text symbols had type STEXT, but now that
   there are different sections of STEXT, we can only rely on symbols in the
   same package in the same section being close enough not to need
   trampolines.

Fixes #70379.

Change-Id: Ifad2bdd6001ad3b5b23e641127554e9ec374715e
Reviewed-on: https://go-review.googlesource.com/c/go/+/631036
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/internal/obj/fips140.go
src/cmd/link/internal/arm/asm.go
src/cmd/link/internal/arm64/asm.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/loong64/asm.go
src/cmd/link/internal/ppc64/asm.go
src/cmd/link/internal/riscv64/asm.go