diff options
author | Alessio Igor Bogani <abogani@kernel.org> | 2011-04-14 08:59:39 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-05-19 03:25:27 -0400 |
commit | f02e8a6596b7dc9b2171f7ff5654039ef0950cdc (patch) | |
tree | 7e306a718415a53aea737c434f33eb36f3e53abc /scripts | |
parent | de4d8d53465483168d6a627d409ee2d09d8e3308 (diff) |
module: Sort exported symbols
This patch places every exported symbol in its own section
(i.e. "___ksymtab+printk"). Thus the linker will use its SORT() directive
to sort and finally merge all symbol in the right and final section
(i.e. "__ksymtab").
The symbol prefixed archs use an underscore as prefix for symbols.
To avoid collision we use a different character to create the temporary
section names.
This work was supported by a hardware donation from the CE Linux Forum.
Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (folded in '+' fixup)
Tested-by: Dirk Behme <dirk.behme@googlemail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/module-common.lds | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/module-common.lds b/scripts/module-common.lds index 47a1f9ae0ede..0865b3e752be 100644 --- a/scripts/module-common.lds +++ b/scripts/module-common.lds | |||
@@ -5,4 +5,15 @@ | |||
5 | */ | 5 | */ |
6 | SECTIONS { | 6 | SECTIONS { |
7 | /DISCARD/ : { *(.discard) } | 7 | /DISCARD/ : { *(.discard) } |
8 | |||
9 | __ksymtab : { *(SORT(___ksymtab+*)) } | ||
10 | __ksymtab_gpl : { *(SORT(___ksymtab_gpl+*)) } | ||
11 | __ksymtab_unused : { *(SORT(___ksymtab_unused+*)) } | ||
12 | __ksymtab_unused_gpl : { *(SORT(___ksymtab_unused_gpl+*)) } | ||
13 | __ksymtab_gpl_future : { *(SORT(___ksymtab_gpl_future+*)) } | ||
14 | __kcrctab : { *(SORT(___kcrctab+*)) } | ||
15 | __kcrctab_gpl : { *(SORT(___kcrctab_gpl+*)) } | ||
16 | __kcrctab_unused : { *(SORT(___kcrctab_unused+*)) } | ||
17 | __kcrctab_unused_gpl : { *(SORT(___kcrctab_unused_gpl+*)) } | ||
18 | __kcrctab_gpl_future : { *(SORT(___kcrctab_gpl_future+*)) } | ||
8 | } | 19 | } |