OUTPUT_ARCH( "riscv" )


ENTRY (_start)
MEMORY
{
    /* Ram */
    ram (rawx)  : ORIGIN = 0x00010000, LENGTH = 0x10000
}
SECTIONS
{

    . = ORIGIN(ram);
    .text : { 
        *(.text._start)
        *(.text .text.*)
    } >ram

    . = ALIGN(8);

    .rodata : { 
        *(.rodata .rodata.*)
    } >ram

    . = ALIGN(8);

    .data : { *(.data .data.* ) } >ram
    .bss : { *(.bss .bss.* ) } >ram

    . = ALIGN(8);

    PROVIDE(_memory_start = . );
    PROVIDE(_memory_end = ORIGIN(ram) + LENGTH(ram));
    PROVIDE(_stack_size = 1024); /* 1 KiB */
    PROVIDE(_stack_start = _memory_end);
    PROVIDE(_stack_end = _stack_start - _stack_size);
}
