]> Cypherpunks repositories - gostls13.git/commit
cmd/link: do not mark holes in functab
authorCherry Mui <cherryyz@google.com>
Fri, 8 Oct 2021 23:55:17 +0000 (19:55 -0400)
committerCherry Mui <cherryyz@google.com>
Mon, 11 Oct 2021 16:05:38 +0000 (16:05 +0000)
commitbd41f2d3cd82a37e85fcf44067ffd2f728554a3b
treecdf20907e3d16d0717c5d9261fc3e72224b8d6ab
parent2478b6f6d6c1da1085e958ece8b17255aa17be6e
cmd/link: do not mark holes in functab

With multiple text sections, there may be holes (non-Go code) in
the PC range of Go code and covered by the functab. Previously, we
use a linear search with actual PCs to find the functab entry. We
need to use special entries to mark holes, so a PC in the hole can
be distinguished from the previous function.

Now, with the previous CL we find if the PC is in between of the
sections upfront in textOff. There is no need to mark holes in the
functab.

Change-Id: I22ff27279422bfc855c2ca35ba0fdfb63234c113
Reviewed-on: https://go-review.googlesource.com/c/go/+/354874
Trust: Cherry Mui <cherryyz@google.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/link/internal/ld/pcln.go