In case the kernel doesn't support BTF_FUNC_GLOBAL sanitize BTF produced by the compiler for global functions.
Showing the changes to tools/include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -146,6 +146,12 @@ enum { · 145 unmodified lines | |||
| 146 | BTF_VAR_GLOBAL_EXTERN = 2, | 146 | BTF_VAR_GLOBAL_EXTERN = 2, |
| 147 | }; | 147 | }; |
| 148 | 148 | ||
| 149 | enum btf_func_linkage { | ||
| 150 | BTF_FUNC_STATIC = 0, | ||
| 151 | BTF_FUNC_GLOBAL = 1, | ||
| 152 | BTF_FUNC_EXTERN = 2, | ||
| 153 | }; | ||
| 154 | |||
| 149 | /* BTF_KIND_VAR is followed by a single "struct btf_var" to describe | 155 | /* BTF_KIND_VAR is followed by a single "struct btf_var" to describe |
| 150 | * additional information related to the variable such as its linkage. | 156 | * additional information related to the variable such as its linkage. |
| 151 | */ | 157 | */ |