libbpf: Factor out common ELF operations and improve logging
authorAndrii Nakryiko <andriin@fb.com>
Thu, 20 Aug 2020 23:12:36 +0000 (16:12 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Aug 2020 22:40:22 +0000 (15:40 -0700)
commit88a82120282bdef4c331e20991e3057f417beae4
tree72be2dc690af608389a303cf8694fdaab98a694e
parent3ac2e20fba07e57cd229091a568ac14a5434e6bb
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
tools/lib/bpf/libbpf.c