]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: index pcdata symbols in NumberSyms
authorCherry Mui <cherryyz@google.com>
Mon, 27 Sep 2021 19:35:46 +0000 (15:35 -0400)
committerCherry Mui <cherryyz@google.com>
Tue, 28 Sep 2021 15:25:40 +0000 (15:25 +0000)
commitdf63673d6a85d4243cc68c2225264afab6cfbf3b
tree274cb6078afc5b2796d7a65d3fc7ea5e729d0e66
parent02d56a1584f968b86b669b3b943dc2ffad30e087
cmd/internal/obj: index pcdata symbols in NumberSyms

When writing an object file, most symbols are indexed in
NumberSyms. Currently, pcdata symbols are indexed late and
separately. This is not really necessary, as pcdata symbols
already exist at the time of NumberSyms. Just do it there.

As pcdata symbols are laid out in the pclntab in a special way at
link time, distinguish them from other symbols in the content
hash. (In the old code this was partly achieved by indexing them
late.)

Change-Id: Ie9e721382b0af2cfb39350d031e2e66d79095a3c
Reviewed-on: https://go-review.googlesource.com/c/go/+/352611
Trust: Cherry Mui <cherryyz@google.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/pcln.go
src/cmd/internal/obj/sym.go