Commit Graph

13 Commits (8f5a17b54265ce2ad2cbec158292b1bf559ddfd3)

Author SHA1 Message Date
Alessandro Decina 54637eab04 Improve relocation errors
Use BpfError::RelocationError for both maps and BTF relocations. The
error includes the name of the program that failed, and the source error
stored as Box<dyn Error>.

This hides the implementation details of the source errors - which are
unrecoverable anyway - while still allowing fine grained error messages.
4 years ago
Alessandro Decina 37c3a198c4 Rework the error hierarchy
Add BpfError::IO and BpfError::BtfError and remove the nested IO and
BtfError variants inside ParseError and RelocationError
4 years ago
Alessandro Decina 96db24e285 Untangle map relocation from BTF relocation 4 years ago
Alessandro Decina 88d49927c2 btf: rename BtfRelocationError to RelocationError 4 years ago
Alessandro Decina 3b668d9274 Fix some warnings 4 years ago
Alessandro Decina 65d520bbd7 Support non-native endianness 4 years ago
Alessandro Decina 5b8def7b69 Refactor ELF parser a bit and add more tests 4 years ago
Alessandro Decina fd0ba2355d btf: remove object::pod usage 4 years ago
Alessandro Decina 4b65da66ea btf: check array bounds while doing candidate matching 4 years ago
Alessandro Decina b49a627cac btf: implement candidate matching for enums 4 years ago
Alessandro Decina 08d5fa6059 Initial BTF support
Still missing a couple of things but the bulk is there
4 years ago
Alessandro Decina b75efc8efe bpf: fix loading socket filters from obj files 4 years ago
Alessandro Decina 15be301f8c Initial commit 4 years ago