Skip to content

Commit 003f524

Browse files
ianlancetaylorgopherbot
authored andcommitted
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>
1 parent 21b6ab5 commit 003f524

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cmd/link/link_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,4 +2109,8 @@ func TestFuncdataPlacement(t *testing.T) {
21092109
}
21102110
}
21112111
}
2112+
2113+
if uint64(moddata.findfunctab)-imageBase < pclntabAddr || uint64(moddata.findfunctab)-imageBase >= pclntabEnd {
2114+
t.Errorf("findfunctab address %#x not between %#x and %#x", moddata.findfunctab, pclntabAddr, pclntabEnd)
2115+
}
21122116
}

0 commit comments

Comments
 (0)