aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-02-19 15:00:18 -0500
committerSam Ravnborg <sam@ravnborg.org>2008-02-19 15:00:18 -0500
commit37c514e3dfc8f55145d9c6895e2838ac31859aa4 (patch)
tree3e626badf00d003c988c318d6de860b5444f5cf2
parentb1d2675a6466090b68d4ef63f9237b4d70a18857 (diff)
Add missing init section definitions
When adding __devinitconst etc. the __initconst variant were missed. Add this one and proper definitions for .head.text for use in .S files. The naming .head.text is preferred over .text.head as the latter will conflict for a function named head when introducing -ffunctions-sections. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--include/asm-generic/vmlinux.lds.h3
-rw-r--r--include/linux/init.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f784d2f34149..f054778e916c 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -238,6 +238,9 @@
238 *(.kprobes.text) \ 238 *(.kprobes.text) \
239 VMLINUX_SYMBOL(__kprobes_text_end) = .; 239 VMLINUX_SYMBOL(__kprobes_text_end) = .;
240 240
241/* Section used for early init (in .S files) */
242#define HEAD_TEXT *(.head.text)
243
241/* init and exit section handling */ 244/* init and exit section handling */
242#define INIT_DATA \ 245#define INIT_DATA \
243 *(.init.data) \ 246 *(.init.data) \
diff --git a/include/linux/init.h b/include/linux/init.h
index a404a0055dd7..fb58c0493cf2 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -42,6 +42,7 @@
42 discard it in modules) */ 42 discard it in modules) */
43#define __init __section(.init.text) __cold 43#define __init __section(.init.text) __cold
44#define __initdata __section(.init.data) 44#define __initdata __section(.init.data)
45#define __initconst __section(.init.rodata)
45#define __exitdata __section(.exit.data) 46#define __exitdata __section(.exit.data)
46#define __exit_call __used __section(.exitcall.exit) 47#define __exit_call __used __section(.exitcall.exit)
47 48
@@ -106,6 +107,7 @@
106#define __memexitconst __section(.memexit.rodata) 107#define __memexitconst __section(.memexit.rodata)
107 108
108/* For assembly routines */ 109/* For assembly routines */
110#define __HEAD .section ".head.text","ax"
109#define __INIT .section ".init.text","ax" 111#define __INIT .section ".init.text","ax"
110#define __FINIT .previous 112#define __FINIT .previous
111 113