]> 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)
commit98e795e72bc82c9959648fbe888e5463d6c50b2b
treeb62d792c4764cbf142ee1266d2eb27c511656828
parent7e6e9da85e07125bcbcb3fdadb87443286fbf791
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: c8570ae0a1d0 ("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