summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-06-08 21:58:46 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2017-06-08 21:59:58 -0700
commita05948f5d0630aaa62f7d296e5f3ed78409c433f (patch)
tree832e911dbc0c645133a57ced2e1146dc4f5fe506 /bsp
parent30f7ed1019841ef177bdeceebe62ce927f05c81a (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')
-rw-r--r--bsp/env/coreplexip-e31-arty/link.lds2
-rw-r--r--bsp/env/freedom-e300-hifive1/link.lds2
2 files changed, 4 insertions, 0 deletions
diff --git a/bsp/env/coreplexip-e31-arty/link.lds b/bsp/env/coreplexip-e31-arty/link.lds
index 45a82d7..4e41577 100644
--- a/bsp/env/coreplexip-e31-arty/link.lds
+++ b/bsp/env/coreplexip-e31-arty/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.*)
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.*)