diff options
| author | Ian Lance Taylor <iant@golang.org> | 2025-11-17 18:35:50 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-11-26 20:29:49 -0800 |
| commit | 003f52407a8a32575084ffc4b15486aa8757ec74 (patch) | |
| tree | ebc96caf77a0ae6d73b5f0c4f520c86f420f7a15 /src/cmd/link | |
| parent | 21b6ab57d572e1712112caadf79160200ddb7d1b (diff) | |
| download | go-003f52407a8a32575084ffc4b15486aa8757ec74.tar.xz | |
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 <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>
Diffstat (limited to 'src/cmd/link')
| -rw-r--r-- | src/cmd/link/link_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) + } } |
