LoadCollectionSpec parses an ELF file into a CollectionSpec.
(file string)
| 61 | |
| 62 | // LoadCollectionSpec parses an ELF file into a CollectionSpec. |
| 63 | func LoadCollectionSpec(file string) (*CollectionSpec, error) { |
| 64 | f, err := os.Open(file) |
| 65 | if err != nil { |
| 66 | return nil, err |
| 67 | } |
| 68 | defer f.Close() |
| 69 | |
| 70 | spec, err := LoadCollectionSpecFromReader(f) |
| 71 | if err != nil { |
| 72 | return nil, fmt.Errorf("file %s: %w", file, err) |
| 73 | } |
| 74 | return spec, nil |
| 75 | } |
| 76 | |
| 77 | // LoadCollectionSpecFromReader parses an ELF file into a CollectionSpec. |
| 78 | func LoadCollectionSpecFromReader(rd io.ReaderAt) (*CollectionSpec, error) { |
searching dependent graphs…