Commit dcd98059 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Move param section out of init area, for export of built-in module params

When exporting the module parameters of built-in modules, we need to access
the respective struct kernel_parameters.  Currently, they're freed at init
time, and obviously this can't continue to be done.  So, move them out of
__init_begin and __init_end and into RODATA in asm-generic/vmlinux.lds.h.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified)
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4bf91c19
......@@ -45,11 +45,6 @@ SECTIONS
.init.setup : { *(.init.setup) }
__setup_end = .;
. = ALIGN(8);
__start___param = .;
__param : { *(__param) }
__stop___param = .;
. = ALIGN(8);
__initcall_start = .;
.initcall.init : {
......
......@@ -38,9 +38,6 @@ SECTIONS
__early_begin = .;
*(__early_param)
__early_end = .;
__start___param = .;
*(__param)
__stop___param = .;
__initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
......
......@@ -34,9 +34,6 @@ SECTIONS
__early_begin = .;
*(__early_param)
__early_end = .;
__start___param = .;
*(__param)
__stop___param = .;
__initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
......
......@@ -35,9 +35,6 @@ SECTIONS
__early_begin = .;
*(__early_param)
__early_end = .;
__start___param = .;
*(__param)
__stop___param = .;
__initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
......
......@@ -64,9 +64,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
.initcall.init : {
__initcall_start = .;
*(.initcall1.init);
......
......@@ -150,9 +150,6 @@ SECTIONS
*(.init.setup)
. = ALIGN(0x4) ;
___setup_end = .;
___start___param = .;
*(__param)
___stop___param = .;
___initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
......
......@@ -67,9 +67,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -135,12 +135,6 @@ SECTIONS
*(.init.setup)
__setup_end = .;
}
__param : AT(ADDR(__param) - LOAD_OFFSET)
{
__start___param = .;
*(__param)
__stop___param = .;
}
.initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET)
{
__initcall_start = .;
......
......@@ -51,9 +51,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -45,9 +45,6 @@ __init_begin = .;
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -284,9 +284,6 @@ SECTIONS {
__setup_start = .;
*(.init.setup)
__setup_end = .;
__start___param = .;
*(__param)
__stop___param = .;
__initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
......
......@@ -96,9 +96,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
.early_initcall.init : {
__earlyinitcall_start = .;
......
......@@ -130,9 +130,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -102,9 +102,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -61,12 +61,6 @@ SECTIONS
__setup_end = .;
}
__param : {
__start___param = .;
*(__param)
__stop___param = .;
}
.initcall.init : {
__initcall_start = .;
*(.initcall1.init)
......
......@@ -78,9 +78,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -75,9 +75,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -106,9 +106,6 @@ SECTIONS
__setup_start = .;
.init.setup : C_PHYS(.init.setup) { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : C_PHYS(__param) { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : C_PHYS(.initcall.init) {
*(.initcall1.init)
......
......@@ -46,9 +46,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -52,9 +52,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -111,9 +111,6 @@
*(.init.setup) /* 2.5 convention */ \
*(.setup.init) /* 2.4 convention */ \
___setup_end = . ; \
___start___param = . ; \
*(__param) \
___stop___param = . ; \
___initcall_start = . ; \
*(.initcall.init) \
*(.initcall1.init) \
......
......@@ -91,9 +91,6 @@ SECTIONS
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -57,6 +57,13 @@
/* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
*(__ksymtab_strings) \
} \
\
/* Built-in module parameters. */ \
__param : AT(ADDR(__param) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start___param) = .; \
*(__param) \
VMLINUX_SYMBOL(__stop___param) = .; \
}
#define SECURITY_INIT \
......
......@@ -36,10 +36,6 @@
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
. = ALIGN(32);
__per_cpu_start = . ;
.data.percpu : { *(.data.percpu) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment