Skip to content

Commit 073a9ec

Browse files
masahir0ytorvalds
authored andcommitted
init/version.c: remove Version_<LINUX_VERSION_CODE> symbol
This code hunk creates a Version_<LINUX_VERSION_CODE> symbol if CONFIG_KALLSYMS is disabled. For example, building the kernel v5.10 for allnoconfig creates the following symbol: $ nm vmlinux | grep Version_ c116b028 B Version_330240 There is no in-tree user of this symbol. Commit 197dcff ("init/version.c: define version_string only if CONFIG_KALLSYMS is not defined") mentions that Version_* is only used with ksymoops. However, a commit in the pre-git era [1] had added the statement, "ksymoops is useless on 2.6. Please use the Oops in its original format". That statement existed until commit 4eb9241 ("Documentation: admin-guide: update bug-hunting.rst") finally removed the stale ksymoops information. This symbol is no longer needed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=ad68b2f085f5c79e4759ca2d13947b3c885ee831 Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Masahiro Yamada <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Daniel Guilak <[email protected]> Cc: Lee Revell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 5b8f82e commit 073a9ec

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

init/version.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
#include <linux/version.h>
1717
#include <linux/proc_ns.h>
1818

19-
#ifndef CONFIG_KALLSYMS
20-
#define version(a) Version_ ## a
21-
#define version_string(a) version(a)
22-
23-
extern int version_string(LINUX_VERSION_CODE);
24-
int version_string(LINUX_VERSION_CODE);
25-
#endif
26-
2719
struct uts_namespace init_uts_ns = {
2820
.ns.count = REFCOUNT_INIT(2),
2921
.name = {

0 commit comments

Comments
 (0)