浏览代码

Fix .data alignment issue

Vadim Kaushan 5 年之前
父节点
当前提交
03a3639de8
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      riscv-rt/link.x

+ 5 - 0
riscv-rt/link.x

@@ -50,6 +50,11 @@ SECTIONS
   .rodata : ALIGN(4)
   {
     *(.rodata .rodata.*);
+
+    /* 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);
   } > REGION_RODATA :load
 
   .data : ALIGN(4)