From: Ian Lance Taylor Date: Tue, 18 Nov 2025 02:35:50 +0000 (-0800) Subject: cmd/link: test that findfunctab is in gopclntab section X-Git-Tag: go1.26rc1~50 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=003f52407a8a32575084ffc4b15486aa8757ec74;p=gostls13.git cmd/link: test that findfunctab is in gopclntab section This is a test for CL 719743. Change-Id: I2d7b9d00d2d4dd63a21ca00f09eb7c9378ec70f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/721461 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor Reviewed-by: Cherry Mui --- diff --git a/src/cmd/link/link_test.go b/src/cmd/link/link_test.go index 96e5d5f156..77bbc3c1f8 100644 --- a/src/cmd/link/link_test.go +++ b/src/cmd/link/link_test.go @@ -2109,4 +2109,8 @@ func TestFuncdataPlacement(t *testing.T) { } } } + + if uint64(moddata.findfunctab)-imageBase < pclntabAddr || uint64(moddata.findfunctab)-imageBase >= pclntabEnd { + t.Errorf("findfunctab address %#x not between %#x and %#x", moddata.findfunctab, pclntabAddr, pclntabEnd) + } }