aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/vmlinux.lds.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@vmware.com>2010-12-15 17:00:19 -0500
committerRusty Russell <rusty@rustcorp.com.au>2011-01-23 23:02:51 -0500
commite94965ed5beb23c6fabf7ed31f625e66d7ff28de (patch)
tree842e4cab961b568bcb98d8ab80d7d399110598a4 /include/asm-generic/vmlinux.lds.h
parent1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff)
module: show version information for built-in modules in sysfs
Currently only drivers that are built as modules have their versions shown in /sys/module/<module_name>/version, but this information might also be useful for built-in drivers as well. This especially important for drivers that do not define any parameters - such drivers, if built-in, are completely invisible from userspace. This patch changes MODULE_VERSION() macro so that in case when we are compiling built-in module, version information is stored in a separate section. Kernel then uses this data to create 'version' sysfs attribute in the same fashion it creates attributes for module parameters. Signed-off-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r--include/asm-generic/vmlinux.lds.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 68649336c4ad..6ebb81030d2d 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -364,6 +364,13 @@
364 VMLINUX_SYMBOL(__start___param) = .; \ 364 VMLINUX_SYMBOL(__start___param) = .; \
365 *(__param) \ 365 *(__param) \
366 VMLINUX_SYMBOL(__stop___param) = .; \ 366 VMLINUX_SYMBOL(__stop___param) = .; \
367 } \
368 \
369 /* Built-in module versions. */ \
370 __modver : AT(ADDR(__modver) - LOAD_OFFSET) { \
371 VMLINUX_SYMBOL(__start___modver) = .; \
372 *(__modver) \
373 VMLINUX_SYMBOL(__stop___modver) = .; \
367 . = ALIGN((align)); \ 374 . = ALIGN((align)); \
368 VMLINUX_SYMBOL(__end_rodata) = .; \ 375 VMLINUX_SYMBOL(__end_rodata) = .; \
369 } \ 376 } \