History

libbpf: Sanitize global functions

In case the kernel doesn't support BTF_FUNC_GLOBAL sanitize BTF produced by the compiler for global functions.

Alexei Starovoitov committed 6 years ago

Commit 2d3eb671 parent f41aa382 files · +40 −1Browse files

Showing the changes to tools/include/uapi (1 of 2 files). Show all

Unified · Split

tools/include/uapi/linux/btf.h+6−0
@@ -146,6 +146,12 @@ enum { · 145 unmodified lines
146146 BTF_VAR_GLOBAL_EXTERN = 2,
147147 };
148148
149+enum btf_func_linkage {
150+ BTF_FUNC_STATIC = 0,
151+ BTF_FUNC_GLOBAL = 1,
152+ BTF_FUNC_EXTERN = 2,
153+};
154+
149155 /* BTF_KIND_VAR is followed by a single "struct btf_var" to describe
150156 * additional information related to the variable such as its linkage.
151157 */