aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/elf/file.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/debug/elf/file.go b/src/debug/elf/file.go
index 89bd70b5b2..50452b5bef 100644
--- a/src/debug/elf/file.go
+++ b/src/debug/elf/file.go
@@ -692,6 +692,9 @@ func (f *File) getSymbols64(typ SectionType) ([]Symbol, []byte, error) {
if len(data)%Sym64Size != 0 {
return nil, nil, errors.New("length of symbol section is not a multiple of Sym64Size")
}
+ if len(data) == 0 {
+ return nil, nil, ErrNoSymbols
+ }
strdata, err := f.stringTable(symtabSection.Link)
if err != nil {