Skip to content

Commit 0dd7e45

Browse files
anakryikoAlexei Starovoitov
authored andcommitted
bpftool: Support dumping BTF VAR's "extern" linkage
Add dumping of "extern" linkage for BTF VAR kind. Also shorten "global-allocated" to "global" to be in line with FUNC's "global". Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent b1b9f53 commit 0dd7e45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/bpf/bpftool/btf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ static const char *btf_var_linkage_str(__u32 linkage)
7171
case BTF_VAR_STATIC:
7272
return "static";
7373
case BTF_VAR_GLOBAL_ALLOCATED:
74-
return "global-alloc";
74+
return "global";
75+
case BTF_VAR_GLOBAL_EXTERN:
76+
return "extern";
7577
default:
7678
return "(unknown)";
7779
}

0 commit comments

Comments
 (0)