Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions runtime/libtock_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ SECTIONS {
/* Read-only data section. Contains strings and other global constants. */
.rodata ALIGN(4) : {
*(.rodata.*)
/* .data is placed after .rodata in flash. data_flash_start is used by
* AT() to place .data in flash as well as in rt_header.
*/
_data_flash_start = .;
} > FLASH

/* Sections located in RAM at runtime.
Expand All @@ -102,20 +98,20 @@ SECTIONS {
KEEP(*(.stack_buffer))
. = ALIGN(16);
_stack_top = .; /* Used in rt_header */
} > RAM
} > RAM AT > FLASH

/* Read-write data section. This is deployed as part of FLASH but is copied
* into RAM at runtime.
*/
.data ALIGN(4) : AT(_data_flash_start) {
.data ALIGN(4) : {
data_ram_start = .;
/* .sdata is the RISC-V small data section */
*(.sdata .data)
/* Pad to word alignment so the relocation loop can use word-sized
* copies.
*/
. = ALIGN(4);
} > RAM
} > RAM AT > FLASH

/* BSS section. These are zero-initialized static variables. This section is
* not copied from FLASH into RAM but rather directly initialized, and is
Expand All @@ -125,7 +121,7 @@ SECTIONS {
.bss ALIGN(4) (NOLOAD) : {
/* .sbss is the RISC-V small data section */
*(.sbss .bss.*)
} > RAM
} > RAM AT > FLASH

_heap_start = ADDR(.bss) + SIZEOF(.bss); /* Used by rt_header */

Expand Down