aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2023-04-17 16:50:00 -0400
committerGopher Robot <gobot@golang.org>2023-04-21 19:28:49 +0000
commit7843ca83e7c8229f4fdca22949428a2418f45138 (patch)
treeaf287142e7909423c1e4ea9873c21b15f60aa06b /src/cmd/link
parent2668a190baa302a1fd7e22285cdb343af67530ad (diff)
downloadgo-7843ca83e7c8229f4fdca22949428a2418f45138.tar.xz
internal/abi, runtime, cmd: merge PCDATA_* and FUNCDATA_* consts into internal/abi
We also rename the constants related to unsafe-points: currently, they follow the same naming scheme as the PCDATA table indexes, but are not PCDATA table indexes. For #59670. Change-Id: I06529fecfae535be5fe7d9ac56c886b9106c74fd Reviewed-on: https://go-review.googlesource.com/c/go/+/485497 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/link')
-rw-r--r--src/cmd/link/internal/ld/pcln.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cmd/link/internal/ld/pcln.go b/src/cmd/link/internal/ld/pcln.go
index 13e8cd33da..77806d824a 100644
--- a/src/cmd/link/internal/ld/pcln.go
+++ b/src/cmd/link/internal/ld/pcln.go
@@ -528,8 +528,8 @@ func numPCData(ldr *loader.Loader, s loader.Sym, fi loader.FuncInfo) uint32 {
}
numPCData := uint32(ldr.NumPcdata(s))
if fi.NumInlTree() > 0 {
- if numPCData < objabi.PCDATA_InlTreeIndex+1 {
- numPCData = objabi.PCDATA_InlTreeIndex + 1
+ if numPCData < abi.PCDATA_InlTreeIndex+1 {
+ numPCData = abi.PCDATA_InlTreeIndex + 1
}
}
return numPCData
@@ -566,10 +566,10 @@ func funcData(ldr *loader.Loader, s loader.Sym, fi loader.FuncInfo, inlSym loade
if fi.Valid() {
fdSyms = ldr.Funcdata(s, fdSyms)
if fi.NumInlTree() > 0 {
- if len(fdSyms) < objabi.FUNCDATA_InlTree+1 {
- fdSyms = append(fdSyms, make([]loader.Sym, objabi.FUNCDATA_InlTree+1-len(fdSyms))...)
+ if len(fdSyms) < abi.FUNCDATA_InlTree+1 {
+ fdSyms = append(fdSyms, make([]loader.Sym, abi.FUNCDATA_InlTree+1-len(fdSyms))...)
}
- fdSyms[objabi.FUNCDATA_InlTree] = inlSym
+ fdSyms[abi.FUNCDATA_InlTree] = inlSym
}
}
return fdSyms
@@ -597,8 +597,8 @@ func (state pclntab) calculateFunctabSize(ctxt *Link, funcs []loader.Sym) (int64
fi.Preload()
numFuncData := ldr.NumFuncdata(s)
if fi.NumInlTree() > 0 {
- if numFuncData < objabi.FUNCDATA_InlTree+1 {
- numFuncData = objabi.FUNCDATA_InlTree + 1
+ if numFuncData < abi.FUNCDATA_InlTree+1 {
+ numFuncData = abi.FUNCDATA_InlTree + 1
}
}
size += int64(numPCData(ldr, s, fi) * 4)
@@ -724,7 +724,7 @@ func writeFuncs(ctxt *Link, sb *loader.SymbolBuilder, funcs []loader.Sym, inlSym
sb.SetUint32(ctxt.Arch, off+int64(j*4), uint32(ldr.SymValue(pcSym)))
}
if fi.NumInlTree() > 0 {
- sb.SetUint32(ctxt.Arch, off+objabi.PCDATA_InlTreeIndex*4, uint32(ldr.SymValue(pcinline)))
+ sb.SetUint32(ctxt.Arch, off+abi.PCDATA_InlTreeIndex*4, uint32(ldr.SymValue(pcinline)))
}
}