* should __modver_version_attr be const
@ 2011-04-25 17:28 Mark Salter
0 siblings, 0 replies; only message in thread
From: Mark Salter @ 2011-04-25 17:28 UTC (permalink / raw)
To: linux-kernel
Shouldn't __modver_version_attr be const? It is placed in section
__modver and asm-generic/vmlinux.lds.h puts section __modver in with
RO_DATA_SECTION. Without the const, section __modver has RW attribute.
diff --git a/include/linux/module.h b/include/linux/module.h
index 5de4204..e62f808 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -174,7 +174,7 @@ extern struct module __this_module;
#define MODULE_VERSION(_version) \
extern ssize_t __modver_version_show(struct module_attribute *, \
struct module *, char *); \
- static struct module_version_attribute __modver_version_attr \
+ static const struct module_version_attribute __modver_version_attr \
__used \
__attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \
= { \
--Mark
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-25 17:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-25 17:28 should __modver_version_attr be const Mark Salter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®