core/riscv-rv32i: Format linker script
This is a cleanup/reformat of the linker script.
This brings no functional change.
BRANCH=none
TEST=make buildall
OUTPUT_FORMAT(BFD_FORMAT, BFD_FORMAT, BFD_FORMAT)
OUTPUT_ARCH(BFD_ARCH)
ENTRY(__reset)
+
MEMORY
{
FLASH (rx) : ORIGIN = FW_OFF(SECTION) - CHIP_ILM_BASE, \
LENGTH = FW_SIZE(SECTION)
/*
* ILM (Instruction Local Memory).
- * We connect ILM to internal flash so we are able to boot from the flash.
+ * We connect ILM to internal flash so we are able to
+ * boot from the flash.
*/
ILM (rx) : ORIGIN = FW_OFF(SECTION), LENGTH = FW_SIZE(SECTION)
IRAM (rw) : ORIGIN = CONFIG_RAM_BASE + CHIP_RAM_SPACE_RESERVED,
@@ -32,15 +34,18 @@ MEMORY
H2RAM (rw) : ORIGIN = CONFIG_H2RAM_BASE, LENGTH = CONFIG_H2RAM_SIZE
#endif
}
+
SECTIONS
{
.text : {
- /* We put "__flash_dma_start" at the beginning of the text section
- * to avoid gap.
+ /*
+ * We put "__flash_dma_start" at the beginning of the
+ * text section to avoid gap.
*/
__flash_dma_start = .;
ASSERT((__flash_dma_start == 0),
"__flash_dma_start has to be 4k-byte aligned");
+
KEEP(STRINGIFY(OUTDIR/core/CORE/init.o) (.text.vecttable))
. = ALIGN(4);
__image_data_offset = .;
@@ -51,10 +56,12 @@ SECTIONS
KEEP(*(.flash_direct_map))
. = ALIGN(16);
KEEP(*(.ram_code))
+
__flash_dma_size = . - __flash_dma_start;
ASSERT((__flash_dma_size < IT83XX_ILM_BLOCK_SIZE),
"__flash_dma_size < IT83XX_ILM_BLOCK_SIZE");
. = ALIGN(IT83XX_ILM_BLOCK_SIZE);
+
__flash_text_start = .;
*(.text*)
. = ALIGN(4);
@@ -217,9 +224,9 @@ SECTIONS
*(.bss.slow)
/*
- * Reserve space for deferred function firing times. Each time is a
- * uint64_t, each func is a 32-bit pointer, thus the scaling factor of
- * two.
+ * Reserve space for deferred function firing times.
+ * Each time is a uint64_t, each func is a 32-bit pointer,
+ * thus the scaling factor of two.
*/
. = ALIGN(8);
__deferred_until = .;
@@ -229,8 +236,10 @@ SECTIONS
. = ALIGN(4);
__bss_end = .;
- /* Shared memory buffer must be at the end of preallocated RAM, so it
- * can expand to use all the remaining RAM. */
+ /*
+ * Shared memory buffer must be at the end of preallocated RAM,
+ * so it can expand to use all the remaining RAM.
+ */
__shared_mem_buf = .;
} > IRAM
@@ -261,9 +270,7 @@ SECTIONS
#endif
#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
- /DISCARD/ : {
- *(.google)
- }
+ /DISCARD/ : { *(.google) }
#endif
/DISCARD/ : { *(.ARM.*) }
