aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/objfile.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/internal/obj/objfile.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/internal/obj/objfile.go')
-rw-r--r--src/cmd/internal/obj/objfile.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go
index 5ac15b8228..bc22765abc 100644
--- a/src/cmd/internal/obj/objfile.go
+++ b/src/cmd/internal/obj/objfile.go
@@ -896,7 +896,7 @@ func (ctxt *Link) writeSymDebugNamed(s *LSym, name string) {
fmt.Fprintf(ctxt.Bso, "asm ")
}
fmt.Fprintf(ctxt.Bso, "size=%d", s.Size)
- if s.Type == objabi.STEXT {
+ if s.Type.IsText() {
fn := s.Func()
fmt.Fprintf(ctxt.Bso, " args=%#x locals=%#x funcid=%#x align=%#x", uint64(fn.Args), uint64(fn.Locals), uint64(fn.FuncID), uint64(fn.Align))
if s.Leaf() {
@@ -904,7 +904,7 @@ func (ctxt *Link) writeSymDebugNamed(s *LSym, name string) {
}
}
fmt.Fprintf(ctxt.Bso, "\n")
- if s.Type == objabi.STEXT {
+ if s.Type.IsText() {
for p := s.Func().Text; p != nil; p = p.Link {
fmt.Fprintf(ctxt.Bso, "\t%#04x ", uint(int(p.Pc)))
if ctxt.Debugasm > 1 {