aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/sym/symkind.go
diff options
context:
space:
mode:
authorThan McIntosh <thanm@google.com>2024-03-13 19:03:43 +0000
committerThan McIntosh <thanm@google.com>2024-04-22 13:29:54 +0000
commit2dddc7ef881669276c96356ec44c4e46ec20b1e9 (patch)
tree01c84bf6e5a2c56ed33aa3eb4251ed207fc504ea /src/cmd/link/internal/sym/symkind.go
parent7f76c00fc5678fa782708ba8fece63750cb89d03 (diff)
downloadgo-2dddc7ef881669276c96356ec44c4e46ec20b1e9.tar.gz
go-2dddc7ef881669276c96356ec44c4e46ec20b1e9.zip
cmd/link: move .dynamic and .got sections to relro if applicable
This is the second of two CLs to roll forward the changes in CL 473495, which was subsequently reverted. In this patch we move the .dynamic and .got sections from the writable data segment to the relro segment if the platform supports relro and we're producing a PIE binary, and also moves .got.plt into relro if eager binding is in effect (e.g. -bindnow or -Wl,-z,now). Updates #45681. Change-Id: I9f4fba6e825b96d1b5e27fb75844450dd0a650b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/571417 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/link/internal/sym/symkind.go')
-rw-r--r--src/cmd/link/internal/sym/symkind.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/link/internal/sym/symkind.go b/src/cmd/link/internal/sym/symkind.go
index 08cafb206b..9a1f33c582 100644
--- a/src/cmd/link/internal/sym/symkind.go
+++ b/src/cmd/link/internal/sym/symkind.go
@@ -76,6 +76,7 @@ const (
SGCBITSRELRO
SRODATARELRO
SFUNCTABRELRO
+ SELFRELROSECT
// Part of .data.rel.ro if it exists, otherwise part of .rodata.
STYPELINK