]> Cypherpunks repositories - gostls13.git/commit
runtime: don't put container symbols in functab
authorKeith Randall <khr@golang.org>
Tue, 10 Feb 2015 00:36:25 +0000 (16:36 -0800)
committerKeith Randall <khr@golang.org>
Tue, 10 Feb 2015 23:42:19 +0000 (23:42 +0000)
commit6dd31660b054cb3bc9c1f25c6c9302669a7803e3
treeab6f3e8529c64b8dcb39414a757208a3fa7f9d3b
parentf43a8dea92cd84f6ed53cb51904c7c2ed4c89b07
runtime: don't put container symbols in functab

Container symbols shouldn't be considered as functions in the functab.
Having them present probably messes up function lookup, as you might get
the descriptor of the container instead of the descriptor of the actual
function on the stack.  It also messed up the findfunctab because these
entries caused off-by-one errors in how functab entries were counted.

Normal code is not affected - it only changes (& hopefully fixes) the
behavior for libraries linked as a unit, like:
  net
  runtime/cgo
  runtime/race

Fixes #9804

Change-Id: I81e036e897571ac96567d59e1f1d7f058ca75e85
Reviewed-on: https://go-review.googlesource.com/4290
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/ld/pcln.c
src/runtime/symtab.go