2.5.43 export _end
PATCH 1/1 2.5.43 export _end
Some programs such as ps, lkcd and others need to validate that System.map matches the kernel. Comparing all symbol names from ksyms against map breaks badly when faced with function descriptors (ia64 has hundreds of mismatches because of function descriptors). lkcd attempts to solve this problem by adding kernel_magic which contains the value of _end, but that requires /dev/kmem access to read kernel_magic.
Trivial fix - export _end. Every arch *lds* file defines _end. No special access is required to match ksyms _end against System.map _end.
Index: 43.1/kernel/ksyms.c
kernel/ksyms.c Thu, 17 Oct 2002 12:16:14 +1000 kaos (linux-2.5/w/d/18_ksyms.c 1.22.1.31 444) renamed from kernel/ksyms.c Wed, 16 Oct 2002 14:25:21 +1000 kaos (linux-2.5/w/d/18_ksyms.c 1.22.1.31 444) +4 -0
@@ -602,3 +602,7 @@ EXPORT_SYMBOL(__per_cpu_offset); /* debug */ EXPORT_SYMBOL(dump_stack); + +/* To match ksyms with System.map */ +extern const char _end[]; +EXPORT_SYMBOL(_end);