diff options
Diffstat (limited to 'libgo/go/debug/plan9obj/file.go')
-rw-r--r-- | libgo/go/debug/plan9obj/file.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libgo/go/debug/plan9obj/file.go b/libgo/go/debug/plan9obj/file.go index 314608d..0c33fa1 100644 --- a/libgo/go/debug/plan9obj/file.go +++ b/libgo/go/debug/plan9obj/file.go @@ -82,7 +82,7 @@ type Sym struct { type formatError struct { off int msg string - val interface{} + val any } func (e *formatError) Error() string { @@ -301,11 +301,15 @@ func newTable(symtab []byte, ptrsz int) ([]Sym, error) { return syms, nil } +// ErrNoSymbols is returned by File.Symbols if there is no such section +// in the File. +var ErrNoSymbols = errors.New("no symbol section") + // Symbols returns the symbol table for f. func (f *File) Symbols() ([]Sym, error) { symtabSection := f.Section("syms") if symtabSection == nil { - return nil, errors.New("no symbol section") + return nil, ErrNoSymbols } symtab, err := symtabSection.Data() |