]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Skip well-known ELF sections when iterating ELF
authorAndrii Nakryiko <andriin@fb.com>
Thu, 20 Aug 2020 23:12:38 +0000 (16:12 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Aug 2020 22:40:22 +0000 (15:40 -0700)
commita84f3b04bd2eb8a8a28cd770db5fdbbb463595ec
tree32f091aebdcbf0f28defd547e508a4daac7aaa43
parentb00157e766dbb8bfff3875b8869c0b71918180b0
libbpf: Skip well-known ELF sections when iterating ELF

Skip and don't log ELF sections that libbpf knows about and ignores during ELF
processing. This allows to not unnecessarily log details about those ELF
sections and cleans up libbpf debug log. Ignored sections include DWARF data,
string table, empty .text section and few special (e.g., .llvm_addrsig)
useless sections.

With such ELF sections out of the way, log unrecognized ELF sections at
pr_info level to increase visibility.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200820231250.1293069-5-andriin@fb.com
tools/lib/bpf/libbpf.c