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
This commit is contained in:
Andrii Nakryiko 2021-04-23 11:13:31 -07:00 коммит произвёл Alexei Starovoitov
Родитель b1b9f535c4
Коммит 0dd7e456bb
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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)";
}