diff options
author | Alexei Starovoitov <ast@kernel.org> | 2020-01-09 22:41:19 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-01-10 17:20:07 +0100 |
commit | 2d3eb67f64ec317bbfe340cfcc8325d40a6ff317 (patch) | |
tree | 5af845b22b56292a359da753e7dff4d53aa49aa6 /tools/include | |
parent | f41aa387a7896c193b384c5fb531cd2cb9e00128 (diff) |
libbpf: Sanitize global functions
In case the kernel doesn't support BTF_FUNC_GLOBAL sanitize BTF produced by the
compiler for global functions.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200110064124.1760511-2-ast@kernel.org
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/uapi/linux/btf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi/linux/btf.h index 1a2898c482ee..5a667107ad2c 100644 --- a/tools/include/uapi/linux/btf.h +++ b/tools/include/uapi/linux/btf.h @@ -146,6 +146,12 @@ enum { BTF_VAR_GLOBAL_EXTERN = 2, }; +enum btf_func_linkage { + BTF_FUNC_STATIC = 0, + BTF_FUNC_GLOBAL = 1, + BTF_FUNC_EXTERN = 2, +}; + /* BTF_KIND_VAR is followed by a single "struct btf_var" to describe * additional information related to the variable such as its linkage. */ |