summaryrefslogtreecommitdiff
path: root/tools/lib/bpf
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2022-06-07 09:26:42 +0300
committerAlexei Starovoitov <ast@kernel.org>2022-06-07 20:20:43 +0300
commit6ec7d79be202db14bd0ceeb9ed32908bcaae27fa (patch)
treee969840d2e0728140327b73603804fcd75dd9bf9 /tools/lib/bpf
parentf2a625889bb8d153d277f557c929d43874561f10 (diff)
downloadlinux-6ec7d79be202db14bd0ceeb9ed32908bcaae27fa.tar.xz
libbpf: Add enum64 support for bpf linking
Add BTF_KIND_ENUM64 support for bpf linking, which is very similar to BTF_KIND_ENUM. Acked-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/r/20220607062642.3721494-1-yhs@fb.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf')
-rw-r--r--tools/lib/bpf/linker.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index 85c0fddf55d1..4ac02c28e152 100644
--- a/tools/lib/bpf/linker.c
+++ b/tools/lib/bpf/linker.c
@@ -1335,6 +1335,7 @@ recur:
case BTF_KIND_STRUCT:
case BTF_KIND_UNION:
case BTF_KIND_ENUM:
+ case BTF_KIND_ENUM64:
case BTF_KIND_FWD:
case BTF_KIND_FUNC:
case BTF_KIND_VAR:
@@ -1357,6 +1358,7 @@ recur:
case BTF_KIND_INT:
case BTF_KIND_FLOAT:
case BTF_KIND_ENUM:
+ case BTF_KIND_ENUM64:
/* ignore encoding for int and enum values for enum */
if (t1->size != t2->size) {
pr_warn("global '%s': incompatible %s '%s' size %u and %u\n",