[dev.link] cmd/link, cmd/compile: create content addressable pcdata syms

Switch pcdata over to content addressable symbols. This is the last
step before removing these from pclntab_old.

No meaningful benchmarks changes come from this work.

Change-Id: I3f74f3d6026a278babe437c8010e22992c92bd89
Reviewed-on: https://go-review.googlesource.com/c/go/+/247399
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Jeremy Faller 2020-08-07 11:31:20 -04:00
parent 954db9fe51
commit 5387cdcb24
10 changed files with 181 additions and 131 deletions

View file

@ -421,8 +421,11 @@ const (
AuxDwarfLoc
AuxDwarfRanges
AuxDwarfLines
// TODO: more. Pcdata?
AuxPcsp
AuxPcfile
AuxPcline
AuxPcinline
AuxPcdata
)
func (a *Aux) Type() uint8 { return a[0] }
@ -827,11 +830,6 @@ func (r *Reader) Data(i uint32) []byte {
return r.BytesAt(base+off, int(end-off))
}
// AuxDataBase returns the base offset of the aux data block.
func (r *Reader) PcdataBase() uint32 {
return r.h.Offsets[BlkPcdata]
}
// NRefName returns the number of referenced symbol names.
func (r *Reader) NRefName() int {
return int(r.h.Offsets[BlkRefName+1]-r.h.Offsets[BlkRefName]) / RefNameSize