-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3743 from masatake/ldscript--sort-keyword
LdScript: support SORT keyword
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--sort=no | ||
--extras=+r | ||
--fields=+r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.discard input.lds /^ *(.discard)$/;" i roles:discarded | ||
.discard. input.lds /^ *(.discard.*)$/;" i roles:discarded | ||
__ksymtab input.lds /^ __ksymtab 0 : { *(SORT(___ksymtab+*)) }$/;" S roles:def | ||
___ksymtab input.lds /^ __ksymtab 0 : { *(SORT(___ksymtab+*)) }$/;" i section:__ksymtab roles:mapped | ||
__ksymtab_gpl input.lds /^ __ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }$/;" S roles:def | ||
___ksymtab_gpl input.lds /^ __ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }$/;" i section:__ksymtab_gpl roles:mapped | ||
__ksymtab_unused input.lds /^ __ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) }$/;" S roles:def | ||
___ksymtab_unused input.lds /^ __ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) }$/;" i section:__ksymtab_unused roles:mapped | ||
__ksymtab_unused_gpl input.lds /^ __ksymtab_unused_gpl 0 : { *(SORT(___ksymtab_unused_gpl+*)) }$/;" S roles:def | ||
___ksymtab_unused_gpl input.lds /^ __ksymtab_unused_gpl 0 : { *(SORT(___ksymtab_unused_gpl+*)) }$/;" i section:__ksymtab_unused_gpl roles:mapped | ||
__ksymtab_gpl_future input.lds /^ __ksymtab_gpl_future 0 : { *(SORT(___ksymtab_gpl_future+*)) }$/;" S roles:def | ||
___ksymtab_gpl_future input.lds /^ __ksymtab_gpl_future 0 : { *(SORT(___ksymtab_gpl_future+*)) }$/;" i section:__ksymtab_gpl_future roles:mapped | ||
__kcrctab input.lds /^ __kcrctab 0 : { *(SORT(___kcrctab+*)) }$/;" S roles:def | ||
___kcrctab input.lds /^ __kcrctab 0 : { *(SORT(___kcrctab+*)) }$/;" i section:__kcrctab roles:mapped | ||
__kcrctab_gpl input.lds /^ __kcrctab_gpl 0 : { *(SORT(___kcrctab_gpl+*)) }$/;" S roles:def | ||
___kcrctab_gpl input.lds /^ __kcrctab_gpl 0 : { *(SORT(___kcrctab_gpl+*)) }$/;" i section:__kcrctab_gpl roles:mapped | ||
__kcrctab_unused input.lds /^ __kcrctab_unused 0 : { *(SORT(___kcrctab_unused+*)) }$/;" S roles:def | ||
___kcrctab_unused input.lds /^ __kcrctab_unused 0 : { *(SORT(___kcrctab_unused+*)) }$/;" i section:__kcrctab_unused roles:mapped | ||
__kcrctab_unused_gpl input.lds /^ __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) }$/;" S roles:def | ||
___kcrctab_unused_gpl input.lds /^ __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) }$/;" i section:__kcrctab_unused_gpl roles:mapped | ||
__kcrctab_gpl_future input.lds /^ __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) }$/;" S roles:def | ||
___kcrctab_gpl_future input.lds /^ __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) }$/;" i section:__kcrctab_gpl_future roles:mapped | ||
.init_array input.lds /^ .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }$/;" S roles:def | ||
.init_array. input.lds /^ .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }$/;" i section:.init_array roles:mapped | ||
.init_array input.lds /^ .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }$/;" i section:.init_array roles:mapped | ||
__jump_table input.lds /^ __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) }$/;" S roles:def | ||
__jump_table input.lds /^ __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) }$/;" i section:__jump_table roles:mapped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Taken from linux/scripts/module-common.lds */ | ||
/* | ||
* Common module linker script, always used when linking a module. | ||
* Archs are free to supply their own linker scripts. ld will | ||
* combine them automatically. | ||
*/ | ||
SECTIONS { | ||
/DISCARD/ : { | ||
*(.discard) | ||
*(.discard.*) | ||
} | ||
|
||
__ksymtab 0 : { *(SORT(___ksymtab+*)) } | ||
__ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) } | ||
__ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) } | ||
__ksymtab_unused_gpl 0 : { *(SORT(___ksymtab_unused_gpl+*)) } | ||
__ksymtab_gpl_future 0 : { *(SORT(___ksymtab_gpl_future+*)) } | ||
__kcrctab 0 : { *(SORT(___kcrctab+*)) } | ||
__kcrctab_gpl 0 : { *(SORT(___kcrctab_gpl+*)) } | ||
__kcrctab_unused 0 : { *(SORT(___kcrctab_unused+*)) } | ||
__kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) } | ||
__kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) } | ||
|
||
.init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) } | ||
|
||
__jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters