summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-04-23 21:13:31 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-04-24 00:05:25 +0300
commit0dd7e456bb049ec2b5a9e00250918b346c0d17d5 (patch)
tree91669eb0039f4c52f4448c660b1651f048dcd612 /tools/bpf
parentb1b9f535c48f5c20a0f6c218c11199b64347c0a6 (diff)
downloadlinux-0dd7e456bb049ec2b5a9e00250918b346c0d17d5.tar.xz
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 <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20210423181348.1801389-2-andrii@kernel.org
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/btf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
index 62953bbf68b4..001749a34899 100644
--- a/tools/bpf/bpftool/btf.c
+++ b/tools/bpf/bpftool/btf.c
@@ -71,7 +71,9 @@ static const char *btf_var_linkage_str(__u32 linkage)
case BTF_VAR_STATIC:
return "static";
case BTF_VAR_GLOBAL_ALLOCATED:
- return "global-alloc";
+ return "global";
+ case BTF_VAR_GLOBAL_EXTERN:
+ return "extern";
default:
return "(unknown)";
}