| 1 |
From 6cfc3d5b06fe82ec7b7109f5ddfb22745475d165 Mon Sep 17 00:00:00 2001 |
| 2 |
Message-Id: <6cfc3d5b06fe82ec7b7109f5ddfb22745475d165.1676498105.git.osandov@osandov.com> |
| 3 |
From: Martin Rodriguez Reboredo <[email protected]> |
| 4 |
Date: Fri, 16 Sep 2022 14:12:34 -0300 |
| 5 |
Subject: [PATCH] kbuild: Add skip_encoding_btf_enum64 option to pahole |
| 6 |
|
| 7 |
New pahole (version 1.24) generates by default new BTF_KIND_ENUM64 BTF tag, |
| 8 |
which is not supported by stable kernel. |
| 9 |
|
| 10 |
As a result the kernel with CONFIG_DEBUG_INFO_BTF option will fail to |
| 11 |
compile with following error: |
| 12 |
|
| 13 |
BTFIDS vmlinux |
| 14 |
FAILED: load BTF from vmlinux: Invalid argument |
| 15 |
|
| 16 |
New pahole provides --skip_encoding_btf_enum64 option to skip BTF_KIND_ENUM64 |
| 17 |
generation and produce BTF supported by stable kernel. |
| 18 |
|
| 19 |
Adding this option to scripts/pahole-flags.sh. |
| 20 |
|
| 21 |
This change does not have equivalent commit in linus tree, because linus tree |
| 22 |
has support for BTF_KIND_ENUM64 tag, so it does not need to be disabled. |
| 23 |
|
| 24 |
Signed-off-by: Martin Rodriguez Reboredo <[email protected]> |
| 25 |
Signed-off-by: Jiri Olsa <[email protected]> |
| 26 |
Signed-off-by: Greg Kroah-Hartman <[email protected]> |
| 27 |
--- |
| 28 |
scripts/pahole-flags.sh | 4 ++++ |
| 29 |
1 file changed, 4 insertions(+) |
| 30 |
|
| 31 |
diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh |
| 32 |
index 0d99ef17e4a5..d4f3d63cb434 100755 |
| 33 |
--- a/scripts/pahole-flags.sh |
| 34 |
+++ b/scripts/pahole-flags.sh |
| 35 |
@@ -20,4 +20,8 @@ if [ "${pahole_ver}" -ge "122" ]; then |
| 36 |
extra_paholeopt="${extra_paholeopt} -j" |
| 37 |
fi |
| 38 |
|
| 39 |
+if [ "${pahole_ver}" -ge "124" ]; then |
| 40 |
+ extra_paholeopt="${extra_paholeopt} --skip_encoding_btf_enum64" |
| 41 |
+fi |
| 42 |
+ |
| 43 |
echo ${extra_paholeopt} |
| 44 |
-- |
| 45 |
2.30.2 |
| 46 |
|