From Aqua Goat, 8 Months ago, written in C++.
This paste will go to meet its maker in 2 Months.
Embed
  1. OUTPUT_ARCH( "riscv" )
  2. ENTRY(_start)
  3. MEMORY
  4. {
  5.     ram   (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 128M
  6. }
  7. PHDRS
  8. {
  9.     text PT_LOAD;
  10.     rodata PT_LOAD;
  11.     data PT_LOAD;
  12.     bss PT_LOAD;
  13. }
  14.  
  15. SECTIONS {
  16.  
  17.     .text : {
  18.         __kernel_start = .;
  19.         __text_start = .;
  20.         /* .text.init must go first */
  21.         *(.text.init)
  22.         *(.text)
  23.     } >ram AT>ram :text
  24.  
  25.     _global_pointer = .;
  26.     .data BLOCK(4K) : ALIGN(4K) {
  27.         __text_end = .;
  28.         __data_start = .;
  29.         *(.data)
  30.     } >ram AT>ram :data
  31.  
  32.     .rodata BLOCK(4K) : ALIGN(4K) {
  33.         __data_end = .;
  34.         __rodata_start = .;
  35.         *(.rodata)
  36.     } >ram AT>ram :rodata
  37.  
  38.     .bss BLOCK(4K) : ALIGN(4K) {
  39.         __bss_start = .;
  40.         __rodata_end = .;
  41.         *(.bss)
  42.     } >ram AT>ram :bss
  43.  
  44.     . = ALIGN(4K);
  45.     __bss_end = .;
  46.     __kernel_end = .;
  47. }
  48.  
  49. /*
  50. 0000000080039000 D __data_end
  51. 0000000080039000 D __rodata_start
  52. 0000000080039ba8 R _ZN5alloc11collections5btree4node15EMPTY_ROOT_NODE17h18a17c82a8c259a1E
  53. ...
  54. 000000008003d206 R _ZN4core3str15UTF8_CHAR_WIDTH17hf91a9de5dab28d77E
  55. 0000000080050000 B __bss_end
  56. 0000000080050000 B __kernel_end
  57. 0000000080050000 R __bss_start
  58. 0000000080050000 R __rodata_end
  59. 0000000080050000 b _ZN9overhyped7runtime13HAVE_PANICKED17hb23a0d9591dd27acE
  60. 0000000080050008 B _ZN9overhyped3log6LOGGER17h9bbf11dcf23ac9eeE
  61. 0000000080050020 B _ZN9overhyped4uart4UART17h1e013f59f140c7d9E
  62. 0000000080050038 B BOOTSTRAP_CORE_TRAP_CONTEXT
  63. */