aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index b29e7458b96..8b17fd8c790 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -308,6 +308,9 @@ struct module
308 /* The size of the executable code in each section. */ 308 /* The size of the executable code in each section. */
309 unsigned int init_text_size, core_text_size; 309 unsigned int init_text_size, core_text_size;
310 310
311 /* Size of RO sections of the module (text+rodata) */
312 unsigned int init_ro_size, core_ro_size;
313
311 /* Arch-specific module values */ 314 /* Arch-specific module values */
312 struct mod_arch_specific arch; 315 struct mod_arch_specific arch;
313 316
@@ -517,7 +520,7 @@ static inline void __module_get(struct module *module)
517#define symbol_put_addr(p) do { } while(0) 520#define symbol_put_addr(p) do { } while(0)
518 521
519#endif /* CONFIG_MODULE_UNLOAD */ 522#endif /* CONFIG_MODULE_UNLOAD */
520int use_module(struct module *a, struct module *b); 523int ref_module(struct module *a, struct module *b);
521 524
522/* This is a #define so the string doesn't get put in every .o file */ 525/* This is a #define so the string doesn't get put in every .o file */
523#define module_name(mod) \ 526#define module_name(mod) \
@@ -672,7 +675,6 @@ static inline int module_get_iter_tracepoints(struct tracepoint_iter *iter)
672{ 675{
673 return 0; 676 return 0;
674} 677}
675
676#endif /* CONFIG_MODULES */ 678#endif /* CONFIG_MODULES */
677 679
678#ifdef CONFIG_SYSFS 680#ifdef CONFIG_SYSFS
@@ -687,6 +689,13 @@ extern int module_sysfs_initialized;
687 689
688#define __MODULE_STRING(x) __stringify(x) 690#define __MODULE_STRING(x) __stringify(x)
689 691
692#ifdef CONFIG_DEBUG_SET_MODULE_RONX
693extern void set_all_modules_text_rw(void);
694extern void set_all_modules_text_ro(void);
695#else
696static inline void set_all_modules_text_rw(void) { }
697static inline void set_all_modules_text_ro(void) { }
698#endif
690 699
691#ifdef CONFIG_GENERIC_BUG 700#ifdef CONFIG_GENERIC_BUG
692void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *, 701void module_bug_finalize(const Elf_Ehdr *, const Elf_Shdr *,