OUTPUT_ARCH( "riscv" ) ENTRY( _start ) MEMORY { ram : org = 0x80000000, len = 128M } SECTIONS { .text : { _text_start = .; *(.text.init) *(.text .text.*) _text_end = .; } >ram .rodata : { _rodata_start = .; *(.rodata .rodata.*) _rodata_end = .; } >ram .data : { . = ALIGN(4096); _data_start = .; *(.sdata .sdata.*) *(.data .data.*) _data_end = .; } >ram .bss : { _bss_start = .; *(.sbss .sbss.*) *(.bss .bss.*) _bss_end = .; } >ram . = ALIGN(4096); _stack_start = .; _stack_end = . + 0x80000; _heap_start = _stack_end; _memory_end = ORIGIN(ram) + LENGTH(ram); _heap_size = _memory_end - _heap_start; }