diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2021-10-05 13:44:51 -0700 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2021-10-06 20:29:59 +0000 |
| commit | 8238f82bf1ddadd906585e3f11600968d95ce98c (patch) | |
| tree | dfc79b8c47324c4621e56eac204e873ead1defcf /src/runtime/plugin.go | |
| parent | f580b7511491c866a102f3f8be912be8f824b830 (diff) | |
| download | go-8238f82bf1ddadd906585e3f11600968d95ce98c.tar.xz | |
runtime: streamline moduledata.textAddr
Accept a uint32 instead of a uintptr to make call sites simpler.
Do less work in the common case in which len(textsectmap) == 1.
Change-Id: Idd6cdc3fdad7a9356864c83790463b5d3000171b
Reviewed-on: https://go-review.googlesource.com/c/go/+/354132
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/plugin.go')
| -rw-r--r-- | src/runtime/plugin.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/plugin.go b/src/runtime/plugin.go index ab3d802389..f37854f915 100644 --- a/src/runtime/plugin.go +++ b/src/runtime/plugin.go @@ -96,7 +96,7 @@ func plugin_lastmoduleinit() (path string, syms map[string]interface{}, errstr s func pluginftabverify(md *moduledata) { badtable := false for i := 0; i < len(md.ftab); i++ { - entry := md.textAddr(uintptr(md.ftab[i].entryoff)) + entry := md.textAddr(md.ftab[i].entryoff) if md.minpc <= entry && entry <= md.maxpc { continue } |
