libbpf: Ensure ELF symbols table is found before further ELF processing
authorAndrii Nakryiko <andriin@fb.com>
Thu, 3 Sep 2020 20:35:29 +0000 (13:35 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Sep 2020 00:14:39 +0000 (17:14 -0700)
commit0201c575831171292489f14a8b6f79f98936b4d1
treee111201c80992e0f2d760d7399aa57fb5937de83
parent83cf5c68d663fc78ce529c41bf24f9f6be88bef4
libbpf: Ensure ELF symbols table is found before further ELF processing

libbpf ELF parsing logic might need symbols available before ELF parsing is
completed, so we need to make sure that symbols table section is found in
a separate pass before all the subsequent sections are processed.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200903203542.15944-2-andriin@fb.com
tools/lib/bpf/libbpf.c