]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.21] cmd/link: put runtime.end in the last section of data segment
authorCherry Mui <cherryyz@google.com>
Tue, 11 Jun 2024 22:39:19 +0000 (18:39 -0400)
committerJoedian Reid <joedian@google.com>
Mon, 24 Jun 2024 17:00:23 +0000 (17:00 +0000)
commitdfb006701893e0ac9fc12ab2bbd65e1d61c517c8
tree84401544560a751a6887762e3fefe00273ee3dce
parente65014d0593debe036ebbb3691843caf8cdfe61d
[release-branch.go1.21] cmd/link: put runtime.end in the last section of data segment

Currently the runtime.end symbol is put into the noptrbss section,
which is usually the last section, except that when fuzzing is
enabled, the last section is actually .go.fuzzcntrs. The
runtime.end symbol has the value pointing to the end of the data
segment, so if it is not in the last section, the value will not
actually be in the range of the section. This causes an assertion
failure in the new Apple linker. This CL fixes this by putting it
in the last section.

Updates #65169.
Fixes #67944.

Change-Id: I5c991c46a0483a96e5f6e0255a3b444953676026
Reviewed-on: https://go-review.googlesource.com/c/go/+/592095
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit b589478af7f4b09cc9c4d5f76fbbf5cad2b2b7bb)
Reviewed-on: https://go-review.googlesource.com/c/go/+/592477
src/cmd/go/testdata/script/test_fuzz_cgo.txt [new file with mode: 0644]
src/cmd/link/internal/ld/data.go