Assert if HiFive1 program is too large.
[riscv-tests.git] / debug / targets / SiFive / HiFive1.lds
old mode 100755 (executable)
new mode 100644 (file)
index 1e0645a..a37ca0c
@@ -20,11 +20,13 @@ SECTIONS
   }
 
   /* bss segment */
+  __bss_start = .;
   .sbss : {
     *(.sbss .sbss.* .gnu.linkonce.sb.*)
     *(.scommon)
   }
   .bss : { *(.bss) }
+  __bss_end = .;
 
   __malloc_start = .;
   . = . + 512;
@@ -32,3 +34,5 @@ SECTIONS
   /* End of uninitalized data segement */
   _end = .;
 }
+
+ASSERT(_end < 0x80004000, "program is too large")