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)
commit6709a914c8498f42b1498b3d31f4b078d092fd35
treeb62d792c4764cbf142ee1266d2eb27c511656828
parent7a2fa70aaffc2f8823feca22709a00f5c069a8a9
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: 22541a9eeb0d ("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