diff options
| author | cheapie <cheapiephp@gmail.com> | 2026-07-22 20:37:26 -0500 |
|---|---|---|
| committer | cheapie <cheapiephp@gmail.com> | 2026-07-22 20:37:26 -0500 |
| commit | f4ca429185eef4083a4ea3c013cd148a74aaee75 (patch) | |
| tree | 15f4a307ea029a06b92a319be999358dec646e00 /c/phb/rvcontroller.ld | |
| parent | 54d001287239a4b57f88bb56a5aacf6e23565f22 (diff) | |
| download | rvcontroller-f4ca429185eef4083a4ea3c013cd148a74aaee75.tar rvcontroller-f4ca429185eef4083a4ea3c013cd148a74aaee75.tar.gz rvcontroller-f4ca429185eef4083a4ea3c013cd148a74aaee75.tar.bz2 rvcontroller-f4ca429185eef4083a4ea3c013cd148a74aaee75.tar.xz rvcontroller-f4ca429185eef4083a4ea3c013cd148a74aaee75.zip | |
Diffstat (limited to 'c/phb/rvcontroller.ld')
| -rw-r--r-- | c/phb/rvcontroller.ld | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/c/phb/rvcontroller.ld b/c/phb/rvcontroller.ld new file mode 100644 index 0000000..985892b --- /dev/null +++ b/c/phb/rvcontroller.ld @@ -0,0 +1,45 @@ +/* Thanks https://github.com/darklife/darkriscv */ + __heap_size = 0x200; /* required amount of heap */ + __stack_size = 0x800; /* required amount of stack */ + ENTRY(_start); + MEMORY + { + RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 0x10000 + } + SECTIONS + { + .text : + { + *(.text.startup) + *(.text) + *(.text) + *(.rodata*) + } > RAM + .data : + { + *(.sbss) + *(.data) + *(.bss) + *(.rela*) + *(COMMON) + } > RAM + + .heap : + { + . = ALIGN(4); + PROVIDE ( end = . ); + _sheap = .; + . = . + __heap_size; + . = ALIGN(4); + _eheap = .; + } >RAM + + .stack : + { + . = ALIGN(4); + _estack = .; + . = . + __stack_size; + . = ALIGN(4); + _sstack = .; + } >RAM + } |
