From a05948f5d0630aaa62f7d296e5f3ed78409c433f Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Thu, 8 Jun 2017 21:58:46 -0700 Subject: 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. --- bsp/env/freedom-e300-hifive1/link.lds | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bsp/env/freedom-e300-hifive1/link.lds') 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.*) -- cgit v1.2.1-18-gbd029