diff --git a/Kernel/Arch/riscv64/linker.ld b/Kernel/Arch/riscv64/linker.ld index 95bb14fe6e..54f744b491 100644 --- a/Kernel/Arch/riscv64/linker.ld +++ b/Kernel/Arch/riscv64/linker.ld @@ -36,7 +36,6 @@ SECTIONS end_of_safemem_atomic_text = .; *(.text*) - end_of_kernel_text = .; } :text .driver_init ALIGN(4K) : AT (ADDR(.driver_init)) @@ -46,6 +45,15 @@ SECTIONS driver_init_table_end = .; } :text + .unmap_after_init ALIGN(4K) : + { + start_of_unmap_after_init = .; + *(.unmap_after_init*); + end_of_unmap_after_init = .; + + end_of_kernel_text = .; + } :text + .rodata ALIGN(4K) : { start_heap_ctors = .; @@ -66,6 +74,13 @@ SECTIONS end_of_kernel_data = .; } :data + .ro_after_init ALIGN(4K) : + { + start_of_ro_after_init = .; + *(.ro_after_init); + end_of_ro_after_init = .; + } :data + .ksyms ALIGN(4K) : { start_of_kernel_ksyms = .; @@ -88,12 +103,6 @@ SECTIONS physical memory. 8M is wasteful, so this should be properly calculated. */ - /* FIXME: Placeholder to satisfy linker */ - start_of_unmap_after_init = .; - end_of_unmap_after_init = .; - start_of_ro_after_init = .; - end_of_ro_after_init = .; - . = ALIGN(4K); page_tables_phys_start = .;