DORMANTno replies

[PATCH] kallsyms: Always include _edata

From: Christophe Leroy <hidden>
Date: 2025-01-08 09:50:08
Also in: linux-perf-users, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help