Commit f6bb7cb
committed
rust: Proper bindgen sources for BTF debug builds
As Clang 14 supports the btf_type_tag attribute and building with
PAHOLE_HAS_BTF_TAG defines BTF_TYPE_TAG(value) to be
__attribute__((btf_type_tag(#value))). Because of this bindgen might get
confused and discards constness of attributed function parameters that
are indeed const pointers (like const char __user * -> char *).
This patch fixes that by passing a BINDGEN_RUN definition to bindgen
that causes BTF_TYPE_TAG(value) to be defined as nothing, thus
generating proper definitions for functions like write in the
file_operations struct.
Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>1 parent 856eb0e commit f6bb7cb
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
0 commit comments