]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: test that findfunctab is in gopclntab section
authorIan Lance Taylor <iant@golang.org>
Tue, 18 Nov 2025 02:35:50 +0000 (18:35 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 27 Nov 2025 04:29:49 +0000 (20:29 -0800)
This is a test for CL 719743.

Change-Id: I2d7b9d00d2d4dd63a21ca00f09eb7c9378ec70f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/721461
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/link/link_test.go

index 96e5d5f156926716d1bea7f8ca4b04cbbca5c469..77bbc3c1f8a08975d55d51328140d1b12c1736ed 100644 (file)
@@ -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)
+       }
 }