aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/init.h')
-rw-r--r--include/linux/init.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index 8bc32bb2fce2..56ec4c62eee0 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -45,6 +45,19 @@
45#define __exitdata __attribute__ ((__section__(".exit.data"))) 45#define __exitdata __attribute__ ((__section__(".exit.data")))
46#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit"))) 46#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
47 47
48/* modpost check for section mismatches during the kernel build.
49 * A section mismatch happens when there are references from a
50 * code or data section to an init section (both code or data).
51 * The init sections are (for most archs) discarded by the kernel
52 * when early init has completed so all such references are potential bugs.
53 * For exit sections the same issue exists.
54 * The following markers are used for the cases where the reference to
55 * the init/exit section (code or data) is valid and will teach modpost
56 * not to issue a warning.
57 * The markers follow same syntax rules as __init / __initdata. */
58#define __init_refok noinline __attribute__ ((__section__ (".text.init.refok")))
59#define __initdata_refok __attribute__ ((__section__ (".data.init.refok")))
60
48#ifdef MODULE 61#ifdef MODULE
49#define __exit __attribute__ ((__section__(".exit.text"))) 62#define __exit __attribute__ ((__section__(".exit.text")))
50#else 63#else
@@ -52,14 +65,9 @@
52#endif 65#endif
53 66
54/* For assembly routines */ 67/* For assembly routines */
55#ifdef CONFIG_HOTPLUG_CPU
56#define __INIT .section ".text","ax"
57#define __INITDATA .section ".data","aw"
58#else
59#define __INIT .section ".init.text","ax" 68#define __INIT .section ".init.text","ax"
60#define __INITDATA .section ".init.data","aw"
61#endif
62#define __FINIT .previous 69#define __FINIT .previous
70#define __INITDATA .section ".init.data","aw"
63 71
64#ifndef __ASSEMBLY__ 72#ifndef __ASSEMBLY__
65/* 73/*