Skip to content

Commit bbab8d1

Browse files
new
Change-Id: I63824721f4bbc08462b5de7843125d9b3205c1fe
1 parent 458379d commit bbab8d1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/cmd/link/internal/ld/pcln.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ func expandGoroot(s string) string {
828828

829829
const (
830830
SUBBUCKETS = 16
831-
SUBBUCKETSIZE = abi.Pcbucketsize / SUBBUCKETS
831+
SUBBUCKETSIZE = abi.FuncTabBucketSize / SUBBUCKETS
832832
NOIDX = 0x7fffffff
833833
)
834834

@@ -846,7 +846,7 @@ func (ctxt *Link) findfunctab(state *pclntab, container loader.Bitmap) {
846846
// that map to that subbucket.
847847
n := int32((max - min + SUBBUCKETSIZE - 1) / SUBBUCKETSIZE)
848848

849-
nbuckets := int32((max - min + abi.Pcbucketsize - 1) / abi.Pcbucketsize)
849+
nbuckets := int32((max - min + abi.FuncTabBucketSize - 1) / abi.FuncTabBucketSize)
850850

851851
size := 4*int64(nbuckets) + int64(n)
852852

src/internal/abi/symtab.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ const (
108108

109109
const MINFUNC = 16 // minimum size for a function
110110

111-
const Pcbucketsize = 256 * MINFUNC // size of bucket in the pc->func lookup table
111+
const FuncTabBucketSize = 256 * MINFUNC // size of bucket in the pc->func lookup table

src/runtime/symtab.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,8 @@ func findfunc(pc uintptr) funcInfo {
778778
}
779779

780780
x := uintptr(pcOff) + datap.text - datap.minpc // TODO: are datap.text and datap.minpc always equal?
781-
b := x / abi.Pcbucketsize
782-
i := x % abi.Pcbucketsize / (abi.Pcbucketsize / nsub)
781+
b := x / abi.FuncTabBucketSize
782+
i := x % abi.FuncTabBucketSize / (abi.FuncTabBucketSize / nsub)
783783

784784
ffb := (*findfuncbucket)(add(unsafe.Pointer(datap.findfunctab), b*unsafe.Sizeof(findfuncbucket{})))
785785
idx := ffb.idx + uint32(ffb.subbuckets[i])

0 commit comments

Comments
 (0)