diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index f784d2f341496f1ba095ef662720d33916208b52..f054778e916c08e0b1e7cc85dd028de15b21edb2 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -238,6 +238,9 @@ *(.kprobes.text) \ VMLINUX_SYMBOL(__kprobes_text_end) = .; +/* Section used for early init (in .S files) */ +#define HEAD_TEXT *(.head.text) + /* init and exit section handling */ #define INIT_DATA \ *(.init.data) \ diff --git a/include/linux/init.h b/include/linux/init.h index a404a0055dd7400489f5cc2ecff32c45d87f61ce..fb58c0493cf2f4524232ed95fd7b56371602ad28 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -42,6 +42,7 @@ discard it in modules) */ #define __init __section(.init.text) __cold #define __initdata __section(.init.data) +#define __initconst __section(.init.rodata) #define __exitdata __section(.exit.data) #define __exit_call __used __section(.exitcall.exit) @@ -106,6 +107,7 @@ #define __memexitconst __section(.memexit.rodata) /* For assembly routines */ +#define __HEAD .section ".head.text","ax" #define __INIT .section ".init.text","ax" #define __FINIT .previous