Commit graph

12 commits

Author SHA1 Message Date
51743d810f query_abi / query_manifest: catch exceptions from Owee
Owee_elf may raise various exceptions (I may have missed some):
- Owee_buf.Invalid_format of string
- Failure (failwith in Owee_elf.read_identification, called by read_elf)
- Assert_failure (assert in Owee_elf.read_header, called by read_elf)

addresses #1
2022-01-28 13:47:30 +01:00
d3c7b0cd00 Rename binary, implement query-abi, ...
* The binary is renamed from solo5-elftool to osolo5-elftool to allow
  for distinguishing from the binary from solo5
* query_abi is implemented and osolo5-elftool is extended with a
  query-abi sub command
* instead of [assert false] on unknown manifest entry types or abi
  targets an [Error (`Msg ...)] is returned.
2021-12-16 12:12:43 +01:00
01d1db661c Remove inline record, documentation
The single-field records are unnecessary and a left-over from an earlier
iteration of the code.
2021-12-15 16:12:31 +01:00
cceb83ccd7 Rename package solo5_elftool -> solo5-elftool 2021-12-15 15:27:16 +01:00
dd2c6803c6 Fix type error 2021-12-14 13:39:56 +01:00
Robur
55ea217151 Fix reversed order of manifest entry elements 2021-12-13 14:14:58 +00:00
f5d23778cb Use result, improve API
* Asserts and cstruct exceptions are removed in favor of result
* Parse separately and don't emit `RESERVED_FIRST` mft_entry
* Add .mli file exposing types, pretty printers and `query_manifest`
2021-12-13 14:58:44 +01:00
de8b304d87 Add opam file, improve dune files 2021-12-10 19:05:42 +01:00
0156567918 Better naming 2021-12-10 19:05:42 +01:00
c84535962f Improve parsing and add type mft
* mft_entry.b, mft_entry.u are runtime fields. We expect them to be
  zeroed.
* add a type mft with version and mft_entries
* add pretty printers a la solo5-elftool query-manifest
2021-12-10 19:05:42 +01:00
e746d9d794 Parse manifest
Could use some improvements, but it can parse a manifest now.
2021-12-09 16:17:11 +01:00
01aa4a8c8c Initial commit 2021-12-09 11:06:56 +01:00