diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-04-23 11:13:31 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-04-23 14:05:25 -0700 |
commit | 0dd7e456bb049ec2b5a9e00250918b346c0d17d5 (patch) | |
tree | 91669eb0039f4c52f4448c660b1651f048dcd612 /tools/bpf | |
parent | b1b9f535c48f5c20a0f6c218c11199b64347c0a6 (diff) |
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.c | 4 |
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)"; } |