]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld: revised bindnow/relro test for ELF
authorThan McIntosh <thanm@google.com>
Tue, 23 Apr 2024 14:39:23 +0000 (14:39 +0000)
committerThan McIntosh <thanm@google.com>
Thu, 25 Apr 2024 20:23:29 +0000 (20:23 +0000)
commit1ca31eac40c0400efc8211bc2483fd621264be11
tree3c52047443d098702748c49683f6408ff971c964
parent57026007c828ac06fe4f8656c1aa497dd3ba40c3
cmd/link/internal/ld: revised bindnow/relro test for ELF

This patch re-enables the portion of the TestElfBindNow test that
verifies that selected sections are in a read-only segment. Turns out
we can't always check for read-only ".got" on all architectures (on
ppc64le for example ".got" will only turn up if there is CGO use), so
always look for readonly ".dynamic", but only look for readonly ".got"
if the section is present.

Updates #45681.

Change-Id: I4687ae3cf9a81818268925e17700170ba34204a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/581115
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/elf_test.go