data, err := symtabSection.Data()
if err != nil {
- return nil, nil, errors.New("cannot load symbol section")
+ return nil, nil, fmt.Errorf("cannot load symbol section: %w", err)
}
symtab := bytes.NewReader(data)
if symtab.Len()%Sym32Size != 0 {
strdata, err := f.stringTable(symtabSection.Link)
if err != nil {
- return nil, nil, errors.New("cannot load string table section")
+ return nil, nil, fmt.Errorf("cannot load string table section: %w", err)
}
// The first entry is all zeros.
data, err := symtabSection.Data()
if err != nil {
- return nil, nil, errors.New("cannot load symbol section")
+ return nil, nil, fmt.Errorf("cannot load symbol section: %w", err)
}
symtab := bytes.NewReader(data)
if symtab.Len()%Sym64Size != 0 {
strdata, err := f.stringTable(symtabSection.Link)
if err != nil {
- return nil, nil, errors.New("cannot load string table section")
+ return nil, nil, fmt.Errorf("cannot load string table section: %w", err)
}
// The first entry is all zeros.