aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/internal/obj/util.go')
-rw-r--r--src/cmd/internal/obj/util.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go
index 2fc910a78f..14f2271cb2 100644
--- a/src/cmd/internal/obj/util.go
+++ b/src/cmd/internal/obj/util.go
@@ -117,3 +117,9 @@ func (p *Prog) String() string {
}
return p.Ctxt.Arch.Pconv(p)
}
+
+func (ctxt *Link) NewProg() *Prog {
+ p := ctxt.Arch.Prg() // should be the only call to this; all others should use ctxt.NewProg
+ p.Ctxt = ctxt
+ return p
+}