1
0
mirror of https://github.com/golang/go synced 2024-11-18 06:54:49 -07:00

[dev.link] cmd/link: fix funcfunctab crash with darwin + plugin

Fix a bug in findfunctab when building plugin on Darwin (this is
a regression introduced by CL 227842).

Change-Id: Ic610168e45a750c0a2f2b8611d5d9154e6c2622f
Reviewed-on: https://go-review.googlesource.com/c/go/+/228137
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
Than McIntosh 2020-04-13 07:31:19 -04:00
parent e488ade6dd
commit 6aeaf4a0f4

View File

@ -601,7 +601,7 @@ func (ctxt *Link) findfunctab(container loader.Bitmap) {
if i < len(ctxt.Textp2) {
e = ctxt.Textp2[i]
}
for !emitPcln(ctxt, e, container) && i < len(ctxt.Textp2) {
for e != 0 && !emitPcln(ctxt, e, container) && i < len(ctxt.Textp2) {
e = ctxt.Textp2[i]
i++
}