libbpf: Factor out common ELF operations and improve logging

Factor out common ELF operations done throughout the libbpf. This simplifies
usage across multiple places in libbpf, as well as hide error reporting from
higher-level functions and make error logging more consistent.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200820231250.1293069-3-andriin@fb.com
This commit is contained in:
Andrii Nakryiko
2020-08-20 16:12:36 -07:00
committed by Alexei Starovoitov
parent 3ac2e20fba
commit 88a8212028

File diff suppressed because it is too large Load Diff