Since commit 69a87a32f5cd ("perf machine: Include data symbols in the
kernel map"), perf needs _edata symbol.

Make sure it is always included in /proc/kallsyms and not only when
CONFIG_KALLSYMS_ALL is selected.

Signed-off-by: Christophe Leroy <christophe.le...@csgroup.eu>
Fixes: 69a87a32f5cd ("perf machine: Include data symbols in the kernel map")
---
 scripts/kallsyms.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 03852da3d249..391ab7ebce7f 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -215,6 +215,8 @@ static int symbol_valid(const struct sym_entry *s)
                if (string_starts_with(name, "__start_") ||
                    string_starts_with(name, "__stop_"))
                        return 1;
+               if (!strcmp(name, "_edata"))
+                       return 1;
 
                if (symbol_in_range(s, text_ranges,
                                    ARRAY_SIZE(text_ranges)) == 0)
-- 
2.47.0


Reply via email to