diff options
Diffstat (limited to 'cortex-m-rt/link.x.in')
-rw-r--r-- | cortex-m-rt/link.x.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in index 5fa7dbf..dfcf262 100644 --- a/cortex-m-rt/link.x.in +++ b/cortex-m-rt/link.x.in @@ -84,24 +84,24 @@ SECTIONS } > FLASH /* ### .rodata */ - .rodata : + .rodata : ALIGN(4) { *(.rodata .rodata.*); - /* 4-byte align the end (VMA) of this section */ - /* WHY? To my knowledge there's no way to indicate the alignment of *LMA* so we align *this* - section with the goal of using its end address as the LMA of .data */ + /* 4-byte align the end (VMA) of this section. + This is required by LLD to ensure the LMA of the following .data + section will have the correct alignment. */ . = ALIGN(4); } > FLASH /* ## Sections in RAM */ /* ### .data */ - .data : AT(ADDR(.rodata) + SIZEOF(.rodata)) /* LMA */ + .data : ALIGN(4) { *(.data .data.*); . = ALIGN(4); /* 4-byte align the end (VMA) of this section */ - } > RAM + } > RAM AT > FLASH /* VMA of .data */ __sdata = ADDR(.data); @@ -111,7 +111,7 @@ SECTIONS __sidata = LOADADDR(.data); /* ### .bss */ - .bss : + .bss : ALIGN(4) { *(.bss .bss.*); |