}
const (
- BUCKETSIZE = 256 * abi.MINFUNC
SUBBUCKETS = 16
- SUBBUCKETSIZE = BUCKETSIZE / SUBBUCKETS
+ SUBBUCKETSIZE = abi.FuncTabBucketSize / SUBBUCKETS
NOIDX = 0x7fffffff
)
// that map to that subbucket.
n := int32((max - min + SUBBUCKETSIZE - 1) / SUBBUCKETSIZE)
- nbuckets := int32((max - min + BUCKETSIZE - 1) / BUCKETSIZE)
+ nbuckets := int32((max - min + abi.FuncTabBucketSize - 1) / abi.FuncTabBucketSize)
size := 4*int64(nbuckets) + int64(n)
baseaddr uintptr // relocated section address
}
-const pcbucketsize = 256 * abi.MINFUNC // size of bucket in the pc->func lookup table
-
// findfuncbucket is an array of these structures.
// Each bucket represents 4096 bytes of the text segment.
// Each subbucket represents 256 bytes of the text segment.
}
x := uintptr(pcOff) + datap.text - datap.minpc // TODO: are datap.text and datap.minpc always equal?
- b := x / pcbucketsize
- i := x % pcbucketsize / (pcbucketsize / nsub)
+ b := x / abi.FuncTabBucketSize
+ i := x % abi.FuncTabBucketSize / (abi.FuncTabBucketSize / nsub)
ffb := (*findfuncbucket)(add(unsafe.Pointer(datap.findfunctab), b*unsafe.Sizeof(findfuncbucket{})))
idx := ffb.idx + uint32(ffb.subbuckets[i])