_frodata = .;
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1)
- _erodata = .;
- } > rom
- /* We shouldn't have a .data section, but the GNU crapchain whines if we don't */
- .data :
- {
+ /* Make sure the file is aligned on disk as well
+ as in memory; CRC calculation requires that. */
+ FILL(0);
. = ALIGN(4);
- _fdata = .;
- *(.data .data.* .gnu.linkonce.d.*)
- *(.data1)
- *(.sdata .sdata.* .gnu.linkonce.s.*)
- _edata = .;
+ _erodata = .;
} > rom
.bss :
{
*(.eh_frame)
*(.comment)
+ *(.data .data.* .gnu.linkonce.d.*)
+ *(.data1)
+ *(.sdata .sdata.* .gnu.linkonce.s.*)
}
}
printf("Command not found\n");
}
-extern unsigned int _ftext, _edata;
+extern unsigned int _ftext, _erodata;
static void crcbios(void)
{
unsigned int actual_crc;
/*
- * _edata is located right after the end of the flat
+ * _erodata is located right after the end of the flat
* binary image. The CRC tool writes the 32-bit CRC here.
- * We also use the address of _edata to know the length
+ * We also use the address of _erodata to know the length
* of our code.
*/
offset_bios = (unsigned int)&_ftext;
- expected_crc = _edata;
- length = (unsigned int)&_edata - offset_bios;
+ expected_crc = _erodata;
+ length = (unsigned int)&_erodata - offset_bios;
actual_crc = crc32((unsigned char *)offset_bios, length);
if(expected_crc == actual_crc)
printf("BIOS CRC passed (%08x)\n", actual_crc);