aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/ld/lib.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-10-31 09:49:47 -0400
committerGopher Robot <gobot@golang.org>2024-11-07 17:47:42 +0000
commit4582f239c3e4589d73dc9e273368f17a196bc09e (patch)
tree8428029b87c2216453c17b848df883f3a715afe3 /src/cmd/link/internal/ld/lib.go
parent43f889b9e5c45ed53af84419380e8cb69db7c103 (diff)
downloadgo-4582f239c3e4589d73dc9e273368f17a196bc09e.tar.xz
cmd/internal/objabi, cmd/link: introduce SymKind helper methods
These will be necessary when we start using the new FIPS symbols. Split into a separate CL so that these refactoring changes can be tested separate from any FIPS-specific changes. Passes golang.org/x/tools/cmd/toolstash/buildall. Change-Id: I73e5873fcb677f1f572f0668b4dc6f3951d822bc Reviewed-on: https://go-review.googlesource.com/c/go/+/625996 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/link/internal/ld/lib.go')
-rw-r--r--src/cmd/link/internal/ld/lib.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index e74c96c09d..f2cf611b20 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -2748,7 +2748,7 @@ func Entryvalue(ctxt *Link) int64 {
if st == 0 {
return *FlagTextAddr
}
- if !ctxt.IsAIX() && st != sym.STEXT {
+ if !ctxt.IsAIX() && !st.IsText() {
ldr.Errorf(s, "entry not text")
}
return ldr.SymValue(s)
@@ -2768,7 +2768,7 @@ func (ctxt *Link) callgraph() {
if rs == 0 {
continue
}
- if r.Type().IsDirectCall() && ldr.SymType(rs) == sym.STEXT {
+ if r.Type().IsDirectCall() && ldr.SymType(rs).IsText() {
ctxt.Logf("%s calls %s\n", ldr.SymName(s), ldr.SymName(rs))
}
}