]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Support BTF_KIND_FLOAT during type compatibility checks in CO-RE
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 26 Apr 2021 19:29:46 +0000 (12:29 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 27 Apr 2021 01:37:13 +0000 (18:37 -0700)
commit5ef09bc6f04bc728137475d409f58f28cdd9babc
treeb62d792c4764cbf142ee1266d2eb27c511656828
parent4d3ce188b6c6a007e93cddbe624a88df81edc4ae
libbpf: Support BTF_KIND_FLOAT during type compatibility checks in CO-RE

Add BTF_KIND_FLOAT support when doing CO-RE field type compatibility check.
Without this, relocations against float/double fields will fail.

Also adjust one error message to emit instruction index instead of less
convenient instruction byte offset.

Fixes: 9a2d4c08fc5b ("libbpf: Add BTF_KIND_FLOAT support")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Lorenz Bauer <lmb@cloudflare.com>
Link: https://lore.kernel.org/bpf/20210426192949.416837-3-andrii@kernel.org
tools/lib/bpf/libbpf.c