diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-11-24 18:49:44 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-11-24 18:49:44 +0000 |
commit | 46c49262fc9910ba5ff92e76d567ed2e4446fb41 (patch) | |
tree | 5bc1955e8fbf29ea454a0db3db1eaf4955e2ca28 /picorv32/scripts/romload/sections.ld | |
parent | 08cf3d9a31b8acbf679b3c761edc95f3d27f7e2a (diff) | |
parent | 3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c (diff) | |
download | butterstick-46c49262fc9910ba5ff92e76d567ed2e4446fb41.tar.gz butterstick-46c49262fc9910ba5ff92e76d567ed2e4446fb41.zip |
Merge commit '3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c' as 'picorv32'
Diffstat (limited to 'picorv32/scripts/romload/sections.ld')
-rw-r--r-- | picorv32/scripts/romload/sections.ld | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/picorv32/scripts/romload/sections.ld b/picorv32/scripts/romload/sections.ld new file mode 100644 index 0000000..2ec3954 --- /dev/null +++ b/picorv32/scripts/romload/sections.ld @@ -0,0 +1,45 @@ +/* +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. +*/ + +/* starting address needs to be > 0 due to known bug in RISCV/GNU linker */ +MEMORY { + rom(rwx) : ORIGIN = 0x00000100, LENGTH = 63k + ram(rwx) : ORIGIN = 0x00020000, LENGTH = 16k +} + +ENTRY(_pvstart); + +SECTIONS { + .rom : { + _pvstart*(.text); + start*(.text); + . = 0x100; + . = ALIGN(4); + *(.text); + } > rom + + .data : { + _data_lma = LOADADDR(.data); + _data = .; + __global_pointer$ = . ; + *(.data .data.* ) + *(.sdata .sdata.*) + . = ALIGN(4); + _edata = .; + } >ram AT>rom + + .bss : { + _bss_start = .; + *(.bss .bss.*) + . = ALIGN(4); + _bss_end = .; + _end = .; + } >ram + +} |