]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Factor out symtab and relos sanity checks
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 23 Apr 2021 18:13:37 +0000 (11:13 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 23 Apr 2021 21:05:26 +0000 (14:05 -0700)
commitbeb85c999e0be6ede9680a62de6b802ad2d5d4ec
treed041f7ecd17140ba5201bda9821b424c94666a63
parentb6cc49aa963953e3a396018cb381d5ba77fd1e87
libbpf: Factor out symtab and relos sanity checks

Factor out logic for sanity checking SHT_SYMTAB and SHT_REL sections into
separate sections. They are already quite extensive and are suffering from too
deep indentation. Subsequent changes will extend SYMTAB sanity checking
further, so it's better to factor each into a separate function.

No functional changes are intended.

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-8-andrii@kernel.org
tools/lib/bpf/linker.c