aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objfile/objfile.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/internal/objfile/objfile.go')
-rw-r--r--src/cmd/internal/objfile/objfile.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/internal/objfile/objfile.go b/src/cmd/internal/objfile/objfile.go
index 09fa63e60b..3d4a5d27cd 100644
--- a/src/cmd/internal/objfile/objfile.go
+++ b/src/cmd/internal/objfile/objfile.go
@@ -14,6 +14,8 @@ import (
type rawFile interface {
symbols() (syms []Sym, err error)
pcln() (textStart uint64, symtab, pclntab []byte, err error)
+ text() (textStart uint64, text []byte, err error)
+ goarch() string
}
// A File is an opened executable file.
@@ -70,3 +72,11 @@ func (f *File) PCLineTable() (*gosym.Table, error) {
}
return gosym.NewTable(symtab, gosym.NewLineTable(pclntab, textStart))
}
+
+func (f *File) Text() (uint64, []byte, error) {
+ return f.raw.text()
+}
+
+func (f *File) GOARCH() string {
+ return f.raw.goarch()
+}