OSDN Git Service

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)
commitbeaa3711ada4e4a0c8e03a78fec72330185213bf
treed041f7ecd17140ba5201bda9821b424c94666a63
parentc7ef5ec9573f05535370d8716576263681cabec7
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