libbpf: Extend sanity checking ELF symbols with externs validation
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 23 Apr 2021 18:13:39 +0000 (11:13 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 23 Apr 2021 21:05:26 +0000 (14:05 -0700)
commit386b1d241e1b975a239d33be836bc183a52ab18c
treec27ffb88789c8cdb3f0da7dbfcaeaecd7913e239
parent42869d28527695a75346c988ceeedbba7e3880b7
libbpf: Extend sanity checking ELF symbols with externs validation

Add logic to validate extern symbols, plus some other minor extra checks, like
ELF symbol #0 validation, general symbol visibility and binding validations.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210423181348.1801389-10-andrii@kernel.org
tools/lib/bpf/linker.c