diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2017-06-08 21:58:46 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-06-08 21:59:58 -0700 |
commit | a05948f5d0630aaa62f7d296e5f3ed78409c433f (patch) | |
tree | 832e911dbc0c645133a57ced2e1146dc4f5fe506 /bsp/env/freedom-e300-hifive1 | |
parent | 30f7ed1019841ef177bdeceebe62ce927f05c81a (diff) |
Specify alignment on the .sdata and .srodata sections
Without these alignment directives the sections are only required to be
aligned on word-sized boundries, but we sometimes require double-word
alignment. This allows the linker to sanely emit these sections.
Diffstat (limited to 'bsp/env/freedom-e300-hifive1')
-rw-r--r-- | bsp/env/freedom-e300-hifive1/link.lds | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bsp/env/freedom-e300-hifive1/link.lds b/bsp/env/freedom-e300-hifive1/link.lds index 90e5c8f..08b196f 100644 --- a/bsp/env/freedom-e300-hifive1/link.lds +++ b/bsp/env/freedom-e300-hifive1/link.lds @@ -123,6 +123,7 @@ SECTIONS } >ram AT>flash :ram_init .srodata : + ALIGN(8) { PROVIDE( _gp = . + 0x800 ); *(.srodata.cst16) @@ -133,6 +134,7 @@ SECTIONS } >ram AT>flash :ram_init .sdata : + ALIGN(8) { *(.sdata .sdata.*) *(.gnu.linkonce.s.*) |