]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix VERSIONED_SYM_COUNT number parsing
authorJiri Olsa <jolsa@kernel.org>
Wed, 18 Nov 2020 21:13:50 +0000 (22:13 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 19 Nov 2020 16:45:12 +0000 (08:45 -0800)
commit1d4f33c247b4a7cc325abf6079045cbf7e037fb0
treeccc7cce8627207c7c69c0d1945b1c2f6e8ea961c
parentf446892e940b4152cd25ca6805153a45635ef933
libbpf: Fix VERSIONED_SYM_COUNT number parsing

We remove "other info" from "readelf -s --wide" output when
parsing GLOBAL_SYM_COUNT variable, which was added in [1].
But we don't do that for VERSIONED_SYM_COUNT and it's failing
the check_abi target on powerpc Fedora 33.

The extra "other info" wasn't problem for VERSIONED_SYM_COUNT
parsing until commit [2] added awk in the pipe, which assumes
that the last column is symbol, but it can be "other info".

Adding "other info" removal for VERSIONED_SYM_COUNT the same
way as we did for GLOBAL_SYM_COUNT parsing.

[1] b7eca9898dd4 ("libbpf: Fix readelf output parsing for Fedora")
[2] 55e64e216cac ("tools/libbpf: Avoid counting local symbols in ABI check")

Fixes: 55e64e216cac ("tools/libbpf: Avoid counting local symbols in ABI check")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201118211350.1493421-1-jolsa@kernel.org
tools/lib/bpf/Makefile