diff options
| author | 2026-05-29 21:59:53 -0400 | |
|---|---|---|
| committer | 2026-05-29 22:04:38 -0400 | |
| commit | fe456c2014c8d1d88b7fd5b24ebda7f7b4c53460 (patch) | |
| tree | a1ae3682aede1ea7550f4be76a79118bd6502902 /src/ld/virt.ld | |
| download | quail-fe456c2014c8d1d88b7fd5b24ebda7f7b4c53460.tar.gz quail-fe456c2014c8d1d88b7fd5b24ebda7f7b4c53460.zip | |
basic physical memory page allocator
Signed-off-by: Matthew Wozniak <me@woz.blue>
Diffstat (limited to 'src/ld/virt.ld')
| -rw-r--r-- | src/ld/virt.ld | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/ld/virt.ld b/src/ld/virt.ld new file mode 100644 index 0000000..33532c4 --- /dev/null +++ b/src/ld/virt.ld @@ -0,0 +1,46 @@ +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; +} + |
