Commit ace0c5cb authored by Rusty Russell's avatar Rusty Russell Committed by Kai Germaschewski

[PATCH] Place __gpl_ksymtab section in all linker scripts

Explicitly place the __gpl_ksymtab section for every arch.  RMK
pointed out that some archs will place it really badly otherwise.
parent 76d1c81b
......@@ -32,6 +32,13 @@ SECTIONS
__stop___ksymtab = .;
}
/* Kernel symbol table: GPL only */
__gpl_ksymtab ALIGN(8) : {
__start___gpl_ksymtab = .;
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
}
/* All kernel symbols */
__kallsyms ALIGN(8) : {
__start___kallsyms = .;
......
......@@ -78,6 +78,12 @@ SECTIONS
__stop___ksymtab = .;
}
__gpl_ksymtab : { /* Kernel symbol table: GPL-only */
__start___gpl_ksymtab = .;
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
}
.data : {
/*
* The cacheline aligned data
......
......@@ -87,6 +87,12 @@ SECTIONS
__stop___ksymtab = .;
}
__gpl_ksymtab : { /* Kernel symbol table: GPL-only*/
__start___gpl_ksymtab = .;
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
}
__kallsyms : { /* All kernel symbols */
__start___kallsyms = .;
*(__kallsyms)
......
......@@ -43,6 +43,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
. = ALIGN (4);
___data_start = . ;
__Sdata = . ;
......
......@@ -31,6 +31,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
......
......@@ -65,6 +65,11 @@ SECTIONS
{ *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL only */
__gpl_ksymtab : AT(ADDR(__gpl_ksymtab) - PAGE_OFFSET)
{ *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__kallsyms : AT(ADDR(__kallsyms) - PAGE_OFFSET)
{
__start___kallsyms = .; /* All kernel symbols */
......
......@@ -24,6 +24,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL only */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
_etext = .; /* End of text section */
.data : { /* Data */
......
......@@ -30,6 +30,9 @@ SECTIONS
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
}
/* End of data goes *here* so that freeing init code works properly. */
_edata = .;
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -25,6 +25,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -25,6 +25,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -25,6 +25,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -24,6 +24,11 @@ SECTIONS {
__start___ksymtab = .; /* Kernel symbol table */
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(4) ;
_etext = . ;
} > ram
......
......@@ -38,6 +38,9 @@ SECTIONS
__start___ksymtab = . ;
*(__ksymtab)
__stop___ksymtab = . ;
__start___gpl_ksymtab = . ;
*(__gpl_ksymtab)
__stop___gpl_ksymtab = . ;
__start___ex_table = . ;
*(___ex_table)
__stop___ex_table = . ;
......
......@@ -38,6 +38,9 @@ SECTIONS
__start___ksymtab = . ;
*(__ksymtab)
__stop___ksymtab = . ;
__start___gpl_ksymtab = . ;
*(__gpl_ksymtab)
__stop___gpl_ksymtab = . ;
__start___ex_table = . ;
*(___ex_table)
__stop___ex_table = . ;
......
......@@ -30,6 +30,10 @@ SECTIONS
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(0x4) ;
_etext = . ;
__data_rom_start = . ;
......
......@@ -51,6 +51,10 @@ SECTIONS
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
_etext = . ;
__data_rom_start = ALIGN ( 4 ) ;
} > ram
......
......@@ -29,6 +29,10 @@ SECTIONS
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(0x4) ;
_etext = . ;
__data_rom_start = . ;
......
......@@ -50,6 +50,10 @@ SECTIONS
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
_etext = . ;
__data_rom_start = ALIGN ( 4 ) ;
} > ram
......
......@@ -29,6 +29,10 @@ SECTIONS
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
. = ALIGN(0x4) ;
_etext = . ;
__data_rom_start = . ;
......
......@@ -50,6 +50,10 @@ SECTIONS
*(__ksymtab)
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only */
*(__gpl_ksymtab)
__stop___gpl_ksymtab = .;
_etext = . ;
__data_rom_start = ALIGN ( 4 ) ;
} > ram
......
......@@ -29,6 +29,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
_etext = .;
. = ALIGN(8192);
......
......@@ -49,6 +49,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
......
......@@ -61,6 +61,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
......
......@@ -69,6 +69,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
......
......@@ -30,6 +30,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
#ifdef CONFIG_SHARED_KERNEL
. = ALIGN(1048576); /* VM shared segments are 1MB aligned */
......
......@@ -30,6 +30,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
#ifdef CONFIG_SHARED_KERNEL
. = ALIGN(1048576); /* VM shared segments are 1MB aligned */
......
......@@ -37,6 +37,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
......
......@@ -35,6 +35,10 @@ SECTIONS
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .;
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
__stop___kallsyms = .;
......
......@@ -39,6 +39,9 @@ SECTIONS
__start___ksymtab = .;
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .;
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__kstrtab : { *(.kstrtab) }
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
......
......@@ -30,6 +30,9 @@ SECTIONS
__start___ksymtab = .; /* Kernel symbol table */
__ksymtab : { *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */
__gpl_ksymtab : { *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__start___kallsyms = .; /* All kernel symbols */
__kallsyms : { *(__kallsyms) }
......
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