diff options
| author | David Daney <david.daney@cavium.com> | 2017-03-07 20:31:08 -0500 |
|---|---|---|
| committer | Jessica Yu <jeyu@redhat.com> | 2017-03-13 12:40:28 -0400 |
| commit | 5bd933fe4481688d595ae1dd0440006c8675a1a8 (patch) | |
| tree | 75ab5a3e711bdf87db41e96b70885e061d2f0816 /scripts | |
| parent | 4495c08e84729385774601b5146d51d9e5849f81 (diff) | |
module: set .init_array alignment to 8
The proper idiom for aligning linker sections in modules is different
than for built-in sections. ". = ALIGN();" followed by a forced
output address of 0 does nothing, as forcing the address changes the
value of ".".
Use output section alignment specifier instead.
Fixes: 9ddf82521c86 ("kernel: add support for .init_array.* constructors")
Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Jessica Yu <jeyu@redhat.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/module-common.lds | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/module-common.lds b/scripts/module-common.lds index 9b6e246a45d0..d61b9e8678e8 100644 --- a/scripts/module-common.lds +++ b/scripts/module-common.lds | |||
| @@ -20,8 +20,7 @@ SECTIONS { | |||
| 20 | __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) } | 20 | __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) } |
| 21 | __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) } | 21 | __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) } |
| 22 | 22 | ||
| 23 | . = ALIGN(8); | 23 | .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) } |
| 24 | .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) } | ||
| 25 | 24 | ||
| 26 | __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } | 25 | __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } |
| 27 | } | 26 | } |
