]> Cypherpunks repositories - gostls13.git/commit
cmd/link: put .got section in __DATA_CONST segment
authorqmuntal <quimmuntal@gmail.com>
Fri, 24 Jan 2025 11:23:42 +0000 (12:23 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Tue, 25 Feb 2025 19:51:02 +0000 (11:51 -0800)
commit61641c11455af9571e6e01449c7ea774b0069594
treef9310953b806d5cf2b50e1016e0fa3a8266491d1
parenteed2208f152d1172993a3193374625683e244100
cmd/link: put .got section in __DATA_CONST segment

On Darwin, the .got section can be placed in a read-only segment. Only the dynamic linker should modify it at start-up time.

Other read-only sections, like .typelink and .itablink, are already placed in the __DATA_CONST segment. Do the same for the .got section.

Fixes #71416.

Cq-Include-Trybots: luci.golang.try:gotip-darwin-amd64-longtest
Change-Id: I9cd9c20da63b655fabb61d742feb086c3ef3bea7
Reviewed-on: https://go-review.googlesource.com/c/go/+/644055
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/macho.go
src/cmd/link/internal/ld/macho_test.go [new file with mode: 0644]
src/cmd/link/internal/sym/symkind.go
src/cmd/link/internal/sym/symkind_string.go